Obtain the database


We recoded the region to lower letters for Metropolitan Region sectors. Additionally, we generated the _simple columns with the dates with a more common format.


library(readxl)
base_fiscalia_orig <- read_excel(gsub("/SUD_CL/Fiscalia_merge.Rmd","/BASE.xlsx",rstudioapi::getSourceEditorContext()$path), 
    sheet = "BASE", skip = 4, guess_max = min(1000000, Inf)) %>% janitor::clean_names() %>% 
  dplyr::mutate(gls_region=dplyr::case_when(gls_region=="REGION METROPOLITANA CENTRO NORTE"~ "RM Centro Norte",
                                            gls_region=="REGION METROPOLITANA OCCIDENTE"~ "RM Occidente",
                                            gls_region=="REGION METROPOLITANA ORIENTE"~ "RM Oriente",
                                            gls_region=="REGION METROPOLITANA SUR"~ "RM Sur",
                                            T~gls_region)) %>% 
  dplyr::mutate(region_delito=dplyr::case_when(region_delito=="REGION METROPOLITANA CENTRO NORTE"~ "RM Centro Norte",
                                            region_delito=="REGION METROPOLITANA OCCIDENTE"~ "RM Occidente",
                                            region_delito=="REGION METROPOLITANA ORIENTE"~ "RM Oriente",
                                            region_delito=="REGION METROPOLITANA SUR"~ "RM Sur",
                                            T~region_delito)) %>% 
  dplyr::mutate(fec_comision_simple=as.Date(stringr::str_extract(as.character(fec_comision), "^.{10}"))) %>% 
  dplyr::mutate(fec_cbiorelacion_simple=as.Date(stringr::str_extract(as.character(fec_cbiorelacion), "^.{10}"))) %>%
  dplyr::mutate(termino_relacion_simple=as.Date(stringr::str_extract(as.character(termino_relacion), "^.{10}")))
   


library(readxl)
Base_fiscalia_v2 <- read_excel(gsub("/SUD_CL/Fiscalia_merge.Rmd","/Base_v3_dic_2021.xlsx",rstudioapi::getSourceEditorContext()$path), sheet = "Base", skip = 4, guess_max = min(1000000, Inf))%>% janitor::clean_names() %>% 
  dplyr::mutate(gls_region=dplyr::case_when(gls_region=="REGION METROPOLITANA CENTRO NORTE"~ "RM Centro Norte",
                                            gls_region=="REGION METROPOLITANA OCCIDENTE"~ "RM Occidente",
                                            gls_region=="REGION METROPOLITANA ORIENTE"~ "RM Oriente",
                                            gls_region=="REGION METROPOLITANA SUR"~ "RM Sur",
                                            T~gls_region)) %>% 
  dplyr::mutate(region_delito=dplyr::case_when(region_delito=="REGION METROPOLITANA CENTRO NORTE"~ "RM Centro Norte",
                                            region_delito=="REGION METROPOLITANA OCCIDENTE"~ "RM Occidente",
                                            region_delito=="REGION METROPOLITANA ORIENTE"~ "RM Oriente",
                                            region_delito=="REGION METROPOLITANA SUR"~ "RM Sur",
                                            T~region_delito)) %>% 
  dplyr::mutate(fec_comision_simple=as.Date(stringr::str_extract(as.character(fec_comision), "^.{10}")))%>% 
  dplyr::mutate(fec_cbiorelacion_simple=as.Date(stringr::str_extract(as.character(fec_cbiorelacion), "^.{10}")))%>%
  dplyr::mutate(fec_nacimiento_simple=as.Date(stringr::str_extract(as.character(fec_nacimiento), "^.{10}")))%>%
  dplyr::mutate(termino_relacion_simple=as.Date(stringr::str_extract(as.character(termino_relacion), "^.{10}")))%>% 
  dplyr::rename("marca_suspension_43"="marca_suspension_46","marca_pena_44"="marca_pena_47","marca_multa_45"="marca_multa_48","medida_alternativa_46"="medida_alternativa_49","clasificacion_pena_47"="clasificacion_pena_50","tramos_condena_48"="tramos_condena","clasificacion_penarpa_1_49"="clasificacion_penarpa_1_52","clasificacion_penarpa_2_50"="clasificacion_penarpa_2_53","marca_suspension_51"="marca_suspension_54","marca_pena_52"="marca_pena_55","marca_multa_53"="marca_multa_56","medida_alternativa_54"="medida_alternativa_57","clasificacion_pena_55"="clasificacion_pena_58","tramos_condena_56"="tramos_condena_2","clasificacion_penarpa_1_57"="clasificacion_penarpa_1_60","clasificacion_penarpa_2_58"="clasificacion_penarpa_2_61")%>% 
    dplyr::mutate(edad_comision=(unclass(fec_comision_simple)-unclass(fec_nacimiento_simple))/365.25,
                  edad_ter_rel=(unclass(termino_relacion_simple)-unclass(fec_nacimiento_simple))/365.25)


ifelse(nrow(base_fiscalia_orig)==nrow(Base_fiscalia_v2),"There are no differences in the length of the databases","There are differences in the length of the databases")
## [1] "There are no differences in the length of the databases"
paste0("The original database had only missing rows in 'tramos_condena_48' and 'clasificacion_penarpa_1_49'")
## [1] "The original database had only missing rows in 'tramos_condena_48' and 'clasificacion_penarpa_1_49'"
names_comparison<-
data.frame(db1=names(Base_fiscalia_v2)) %>% 
  dplyr::full_join(cbind.data.frame(db1=names(base_fiscalia_orig),db2=names(base_fiscalia_orig)), by="db1")

#comp_data<-diff_data(base_fiscalia_orig,Base_fiscalia_v2,id=c("rut_enc_saf ","rut_enc_saf"))
#V8 FATAL ERROR in CALL_AND_RETRY_LAST ===== C stack trace ======
library(compareGroups)

base_fiscalia<-
  base_fiscalia_orig

no_mostrar=1
if(no_mostrar==0){
CONS_C1_df_dup_SEP_2020_match<-
  CONS_C1_df_dup_SEP_2020 %>% 
  dplyr::filter(dup==1) %>% #, tipo_de_plan_2 %in% c("PG-PR","M-PR","PG-PAI","M-PAI","PG-PAB","M-PAB")
  dplyr::mutate(tipo_de_plan_res=dplyr::case_when(grepl("PR",as.character(tipo_de_plan_2))~1,
                                                  grepl("PAI",as.character(tipo_de_plan_2))~0,
                                                  grepl("PAB",as.character(tipo_de_plan_2))~0,
                                                  TRUE~NA_real_)) %>% 
  dplyr::mutate(tipo_de_plan_res=factor(tipo_de_plan_res)) %>% 
  dplyr::mutate(abandono_temprano_rec=factor(if_else(as.character(motivodeegreso_mod_imp)=="Early Drop-out",TRUE,FALSE,NA))) %>% 
  dplyr::mutate(dg_trs_cons_sus_or=factor(if_else(as.character(dg_trs_cons_sus_or)=="Drug dependence",TRUE,FALSE,NA))) %>% 
  dplyr::mutate(tipo_centro_pub=factor(if_else(as.character(tipo_centro)=="Public",TRUE,FALSE,NA))) %>% 
  dplyr::mutate(condicion_ocupacional_corr=factor(condicion_ocupacional_corr),cat_ocupacional_corr=factor(cat_ocupacional_corr)) %>% 
  dplyr::mutate(dg_trs_fis_rec=factor(dplyr::case_when(as.character(diagnostico_trs_fisico)=="En estudio"~"Diagnosis unknown (under study)",as.character(diagnostico_trs_fisico)=="Sin trastorno"~'Without physical comorbidity',cnt_diagnostico_trs_fisico>0 ~'With physical comorbidity',
                                             TRUE~NA_character_)))%>%
    dplyr::mutate(escolaridad_rec=parse_factor(as.character(escolaridad_rec),levels=c('3-Completed primary school or less', '2-Completed high school or less', '1-More than high school'), ordered=T,trim_ws=T,include_na =F, locale=locale(encoding = "Latin1"))) %>%   
dplyr::mutate(freq_cons_sus_prin=parse_factor(as.character(freq_cons_sus_prin),levels=c('Did not use', 'Less than 1 day a week','2 to 3 days a week','4 to 6 days a week','1 day a week or more','Daily'), ordered =T,trim_ws=T,include_na =F, locale=locale(encoding = "UTF-8"))) %>% 
  dplyr::mutate(evaluacindelprocesoteraputico=dplyr::case_when(grepl("1",as.character(evaluacindelprocesoteraputico))~'1-High Achievement',grepl("2",as.character(evaluacindelprocesoteraputico))~'2-Medium Achievement',grepl("3",as.character(evaluacindelprocesoteraputico))~'3-Minimum Achievement', TRUE~as.character(evaluacindelprocesoteraputico))) %>% 
  dplyr::mutate(evaluacindelprocesoteraputico=parse_factor(as.character(evaluacindelprocesoteraputico),levels=c('1-High Achievement', '2-Medium Achievement','3-Minimum Achievement'), ordered =T,trim_ws=T,include_na =F, locale=locale(encoding = "UTF-8"))) %>% 
  dplyr::select_(.dots = match.on_tot) %>% 
  dplyr::mutate(more_one_treat=factor(ifelse(duplicates_filtered>1,1,0))) %>% 
  data.table::data.table()
#attr(CONS_C1_df_dup_SEP_2020_match$sus_ini_mod_mvv,"label")<-"Starting Substance"
}

invisible("Comentarios")

#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:
#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:
kableone <- function(x, caption=NULL, col.names=NA, smd=T, test=T, varLabels=T, noSpaces=T, printToggle=T, dropEqual=F, ...) {
  capture.output(x <- print(x, smd=T, test=test, varLabels=varLabels,noSpaces=noSpaces, printToggle=printToggle, dropEqual=dropEqual, ...))
  knitr::kable(x,format= "html", format.args= list(decimal.mark= ".", big.mark= ","),
               caption= caption, col.names= col.names)
}
as.data.frame.TableOne <- function(x, ...) {
    capture.output(print(x, showAllLevels = TRUE, test=T, varLabels=T,...) -> x)
    y <- as.data.frame(x)
    y$characteristic <- na_if(rownames(x), "")
    y <- y %>%
        #fill(characteristic, .direction = "down") %>%
        dplyr::select(characteristic, everything())
    rownames(y) <- NULL
    y 
}
#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:
#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:#:

options(knitr.kable.NA = '')

## 
cat("Vector of variables to summarize")
## Vector of variables to summarize
#obtener las columnas así nos permite descartar nombres errróneos
myVars <-dput(names(dplyr::select(base_fiscalia, -c("rut_enc_saf","ruc","idrelacion","cod_delito","cod_lugarocurrencia","cod_parentescoimputado","cod_mottermino","cod_motsuspension","cod_proctermino","idsujeto_imputado","idsujeto_victima","impcod_tiposujeto","cod_lugarocurrencia","cod_sitiosuceso","cod_comunadelito","cod_region","iddelito"))))
## c("encontrado_como_victima", "encontrado_como_imputado", "tipo_sujeto_vic", 
## "gls_tipo_sujeto_vic", "reg", "gls_region", "tipo_termino", "agrupa_terminos", 
## "gls_materia", "familia_delito", "relacion_vifsaf", "gls_parentesco", 
## "gls_mottermino", "gls_motsuspension", "gls_proctermino", "gls_tipo_imputado", 
## "fec_comision", "termino_relacion", "lugar_ocurrencia", "gls_sitiosuceso", 
## "gls_comuna", "region_delito", "fec_cbiorelacion", "medidas_155", 
## "medidas_pp", "medidas_ip", "marca_suspension_43", "marca_pena_44", 
## "marca_multa_45", "medida_alternativa_46", "clasificacion_pena_47", 
## "tramos_condena_48", "clasificacion_penarpa_1_49", "clasificacion_penarpa_2_50", 
## "marca_suspension_51", "marca_pena_52", "marca_multa_53", "medida_alternativa_54", 
## "clasificacion_pena_55", "tramos_condena_56", "clasificacion_penarpa_1_57", 
## "clasificacion_penarpa_2_58", "fec_comision_simple", "fec_cbiorelacion_simple", 
## "termino_relacion_simple")
cat("Vector of categorical variables that need transformation")
## Vector of categorical variables that need transformation
catVars <- dput(names(dplyr::select(base_fiscalia,c("encontrado_como_victima", "encontrado_como_imputado", "gls_tipo_sujeto_vic", "gls_region","tipo_termino","reg", "agrupa_terminos","gls_materia","familia_delito","relacion_vifsaf","gls_parentesco","gls_mottermino","gls_motsuspension","gls_proctermino","gls_tipo_imputado","lugar_ocurrencia","gls_sitiosuceso","gls_comuna","region_delito","medidas_155","medidas_pp","medidas_ip","marca_suspension_43","marca_pena_44","marca_multa_45","medida_alternativa_46","clasificacion_pena_47","tramos_condena_48","clasificacion_penarpa_1_49","clasificacion_penarpa_2_50","marca_suspension_51","marca_pena_52","marca_multa_53","medida_alternativa_54","clasificacion_pena_55","tramos_condena_56","clasificacion_penarpa_1_57","clasificacion_penarpa_2_58"))))
## c("encontrado_como_victima", "encontrado_como_imputado", "gls_tipo_sujeto_vic", 
## "gls_region", "tipo_termino", "reg", "agrupa_terminos", "gls_materia", 
## "familia_delito", "relacion_vifsaf", "gls_parentesco", "gls_mottermino", 
## "gls_motsuspension", "gls_proctermino", "gls_tipo_imputado", 
## "lugar_ocurrencia", "gls_sitiosuceso", "gls_comuna", "region_delito", 
## "medidas_155", "medidas_pp", "medidas_ip", "marca_suspension_43", 
## "marca_pena_44", "marca_multa_45", "medida_alternativa_46", "clasificacion_pena_47", 
## "tramos_condena_48", "clasificacion_penarpa_1_49", "clasificacion_penarpa_2_50", 
## "marca_suspension_51", "marca_pena_52", "marca_multa_53", "medida_alternativa_54", 
## "clasificacion_pena_55", "tramos_condena_56", "clasificacion_penarpa_1_57", 
## "clasificacion_penarpa_2_58")
myVars_nva <-dput(names(dplyr::select(Base_fiscalia_v2, -c("rut_enc_saf","ruc","idrelacion","cod_delito","fec_nacimiento","cod_lugarocurrencia","cod_parentescoimputado","cod_mottermino","cod_motsuspension","cod_proctermino","idsujeto_imputado","idsujeto_victima","impcod_tiposujeto","cod_lugarocurrencia","cod_sitiosuceso","cod_comunadelito","cod_region"))))
## c("pais", "sexo", "encontrado_como_victima", "encontrado_como_imputado", 
## "tipo_sujeto_vic", "gls_tipo_sujeto_vic", "reg", "gls_region", 
## "tipo_termino", "agrupa_terminos", "gls_materia", "familia_delito", 
## "relacion_vifsaf", "gls_parentesco", "gls_mottermino", "gls_motsuspension", 
## "gls_proctermino", "gls_tipo_imputado", "iddelito", "fec_comision", 
## "termino_relacion", "lugar_ocurrencia", "gls_sitiosuceso", "gls_comuna", 
## "region_delito", "fec_cbiorelacion", "medidas_155", "medidas_pp", 
## "medidas_ip", "marca_suspension_43", "marca_pena_44", "marca_multa_45", 
## "medida_alternativa_46", "clasificacion_pena_47", "tramos_condena_48", 
## "clasificacion_penarpa_1_49", "clasificacion_penarpa_2_50", "marca_suspension_51", 
## "marca_pena_52", "marca_multa_53", "medida_alternativa_54", "clasificacion_pena_55", 
## "tramos_condena_56", "clasificacion_penarpa_1_57", "clasificacion_penarpa_2_58", 
## "fec_comision_simple", "fec_cbiorelacion_simple", "fec_nacimiento_simple", 
## "termino_relacion_simple", "edad_comision", "edad_ter_rel")
catVars_bd_nva <- dput(names(dplyr::select(Base_fiscalia_v2,c("encontrado_como_victima", "encontrado_como_imputado", "gls_tipo_sujeto_vic", "gls_region","tipo_termino","pais", "sexo","reg", "agrupa_terminos","gls_materia","familia_delito","relacion_vifsaf","gls_parentesco","gls_mottermino","gls_motsuspension","gls_proctermino","gls_tipo_imputado","lugar_ocurrencia","gls_sitiosuceso","gls_comuna","region_delito","medidas_155","medidas_pp","medidas_ip","marca_suspension_43","marca_pena_44","marca_multa_45","medida_alternativa_46","clasificacion_pena_47","tramos_condena_48","clasificacion_penarpa_1_49","clasificacion_penarpa_2_50","marca_suspension_51","marca_pena_52","marca_multa_53","medida_alternativa_54","clasificacion_pena_55","tramos_condena_56","clasificacion_penarpa_1_57","clasificacion_penarpa_2_58"))))
## c("encontrado_como_victima", "encontrado_como_imputado", "gls_tipo_sujeto_vic", 
## "gls_region", "tipo_termino", "pais", "sexo", "reg", "agrupa_terminos", 
## "gls_materia", "familia_delito", "relacion_vifsaf", "gls_parentesco", 
## "gls_mottermino", "gls_motsuspension", "gls_proctermino", "gls_tipo_imputado", 
## "lugar_ocurrencia", "gls_sitiosuceso", "gls_comuna", "region_delito", 
## "medidas_155", "medidas_pp", "medidas_ip", "marca_suspension_43", 
## "marca_pena_44", "marca_multa_45", "medida_alternativa_46", "clasificacion_pena_47", 
## "tramos_condena_48", "clasificacion_penarpa_1_49", "clasificacion_penarpa_2_50", 
## "marca_suspension_51", "marca_pena_52", "marca_multa_53", "medida_alternativa_54", 
## "clasificacion_pena_55", "tramos_condena_56", "clasificacion_penarpa_1_57", 
## "clasificacion_penarpa_2_58")
tab2 <- as.data.frame.TableOne(CreateTableOne(vars = myVars, data = base_fiscalia[,myVars], factorVars = catVars, smd=T, strata="encontrado_como_imputado", addOverall = T, includeNA=T,test=T), smd=T)%>% 
  dplyr::mutate(char2=characteristic) %>% 
  tidyr::fill(char2) %>% 
  dplyr::select(char2,everything()) %>% 
  dplyr::mutate(level=ifelse(is.na(level),"[Missing]",level))
## Warning in ModuleReturnVarsExist(vars, data): These variables only have NA/
## NaN: tramos_condena_48 clasificacion_penarpa_1_49 clasificacion_penarpa_2_50
## tramos_condena_56 clasificacion_penarpa_1_57 clasificacion_penarpa_2_58 Dropped
## Warning in ModuleReturnVarsExist(factorVars, data): These variables only have
## NA/NaN: tramos_condena_48 clasificacion_penarpa_1_49 clasificacion_penarpa_2_50
## tramos_condena_56 clasificacion_penarpa_1_57 clasificacion_penarpa_2_58 Dropped
## Warning in CreateTableOne(vars = myVars, data = base_fiscalia[, myVars], : Dropping variable(s) fec_comision termino_relacion fec_cbiorelacion fec_comision_simple fec_cbiorelacion_simple termino_relacion_simple  due to unsupported class.
tab2 %>%
      dplyr::select(-characteristic) %>% 
    # dplyr::full_join(tab2b, by=c("char2",c("level"="level2"))) %>% 
    # dplyr::select(-char2,-characteristic.x,-level) %>% 
    # dplyr::select(characteristic.y, level.y,  everything()) %>% 
#fec_nacimiento_simple
kable(size=11, format="html",caption= "Table 1. Summary descriptives, by accused status",smd=T, test=T, varLabels=T,noSpaces=T, printToggle=T, dropEqual=F, col.names=c("Variable ","Level",rep(c("Total (%)","No", "Yes", "p-value","test", "SMD"),1)))%>%
  #kableExtra::add_header_above(c("First attempt" = 3, "Second attempt" = 1), bold=T) %>%
  kableExtra::kable_classic(bootstrap_options = c("striped", "hover","condensed"),font_size= 10) %>%
  row_spec(1, bold=T, italic=T,color="black",hline_after=T,extra_latex_after="\\arrayrulecolor{white}",font_size= 11) %>%
  kableExtra::add_footnote(c("Note. Continuous variables are presented as Medians and Percentiles 25 and 75 were shown;", "Categorical variables are presented as number (%)"), notation = "none")%>%
  kableExtra::scroll_box(width = "100%", height = "375px")
Table 1. Summary descriptives, by accused status
Variable Level Total (%) No Yes p-value test SMD
n 568297 191165 377132
encontrado_como_victima (%) NO 376766 ( 66.3) 0 ( 0.0) 376766 ( 99.9) <0.001 45.374
encontrado_como_victima (%) SI 191531 ( 33.7) 191165 (100.0) 366 ( 0.1)
encontrado_como_imputado (%) NO 191165 ( 33.6) 191165 (100.0) 0 ( 0.0) <0.001 NaN
encontrado_como_imputado (%) SI 377132 ( 66.4) 0 ( 0.0) 377132 (100.0)
tipo_sujeto_vic (%) 1 306 ( 0.1) 0 ( 0.0) 306 ( 0.1) <0.001 0.325
tipo_sujeto_vic (%) 15 226 ( 0.0) 0 ( 0.0) 226 ( 0.1)
tipo_sujeto_vic (%) 19 330 ( 0.1) 0 ( 0.0) 330 ( 0.1)
tipo_sujeto_vic (%) 2 2 ( 0.0) 0 ( 0.0) 2 ( 0.0)
tipo_sujeto_vic (%) 3 13 ( 0.0) 0 ( 0.0) 13 ( 0.0)
tipo_sujeto_vic (%) 5 4 ( 0.0) 0 ( 0.0) 4 ( 0.0)
tipo_sujeto_vic (%) 6 549362 ( 96.7) 191165 (100.0) 358197 ( 95.0)
tipo_sujeto_vic (%) 8 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
tipo_sujeto_vic (%) [Missing] 18053 ( 3.2) 0 ( 0.0) 18053 ( 4.8)
gls_tipo_sujeto_vic (%) ABOGADO QUERELLANTE 1 ( 0.0) 0 ( 0.0) 1 ( 0.0) <0.001 0.325
gls_tipo_sujeto_vic (%) DENUNCIADO 2 ( 0.0) 0 ( 0.0) 2 ( 0.0)
gls_tipo_sujeto_vic (%) DENUNCIANTE 306 ( 0.1) 0 ( 0.0) 306 ( 0.1)
gls_tipo_sujeto_vic (%) IMPUTADO 13 ( 0.0) 0 ( 0.0) 13 ( 0.0)
gls_tipo_sujeto_vic (%) QUERELLANTE 4 ( 0.0) 0 ( 0.0) 4 ( 0.0)
gls_tipo_sujeto_vic (%) TESTIGO 226 ( 0.0) 0 ( 0.0) 226 ( 0.1)
gls_tipo_sujeto_vic (%) VICTIMA 549362 ( 96.7) 191165 (100.0) 358197 ( 95.0)
gls_tipo_sujeto_vic (%) VICTIMA 108i.2 330 ( 0.1) 0 ( 0.0) 330 ( 0.1)
gls_tipo_sujeto_vic (%) [Missing] 18053 ( 3.2) 0 ( 0.0) 18053 ( 4.8)
reg (%) 1 18031 ( 3.2) 4600 ( 2.4) 13431 ( 3.6) <0.001 0.127
reg (%) 2 27310 ( 4.8) 7555 ( 4.0) 19755 ( 5.2)
reg (%) 3 17703 ( 3.1) 5478 ( 2.9) 12225 ( 3.2)
reg (%) 4 23089 ( 4.1) 7920 ( 4.1) 15169 ( 4.0)
reg (%) 5 55411 ( 9.8) 17762 ( 9.3) 37649 ( 10.0)
reg (%) 6 33609 ( 5.9) 11260 ( 5.9) 22349 ( 5.9)
reg (%) 7 30211 ( 5.3) 9809 ( 5.1) 20402 ( 5.4)
reg (%) 8 38601 ( 6.8) 12733 ( 6.7) 25868 ( 6.9)
reg (%) 9 15566 ( 2.7) 5911 ( 3.1) 9655 ( 2.6)
reg (%) 10 19387 ( 3.4) 6445 ( 3.4) 12942 ( 3.4)
reg (%) 11 5383 ( 0.9) 2013 ( 1.1) 3370 ( 0.9)
reg (%) 12 5201 ( 0.9) 1962 ( 1.0) 3239 ( 0.9)
reg (%) 14 78621 ( 13.8) 27199 ( 14.2) 51422 ( 13.6)
reg (%) 15 44119 ( 7.8) 14124 ( 7.4) 29995 ( 8.0)
reg (%) 16 63855 ( 11.2) 23122 ( 12.1) 40733 ( 10.8)
reg (%) 17 63921 ( 11.2) 23836 ( 12.5) 40085 ( 10.6)
reg (%) 18 8453 ( 1.5) 2961 ( 1.5) 5492 ( 1.5)
reg (%) 19 13991 ( 2.5) 4569 ( 2.4) 9422 ( 2.5)
reg (%) 20 5835 ( 1.0) 1906 ( 1.0) 3929 ( 1.0)
gls_region (%) I Región de Tarapaca 18031 ( 3.2) 4600 ( 2.4) 13431 ( 3.6) <0.001 0.127
gls_region (%) II Región de Antofagasta 27310 ( 4.8) 7555 ( 4.0) 19755 ( 5.2)
gls_region (%) III Región de Atacama 17703 ( 3.1) 5478 ( 2.9) 12225 ( 3.2)
gls_region (%) IV Región de Coquimbo 23089 ( 4.1) 7920 ( 4.1) 15169 ( 4.0)
gls_region (%) IX Región de la Araucanía 15566 ( 2.7) 5911 ( 3.1) 9655 ( 2.6)
gls_region (%) RM Centro Norte 78621 ( 13.8) 27199 ( 14.2) 51422 ( 13.6)
gls_region (%) RM Occidente 63855 ( 11.2) 23122 ( 12.1) 40733 ( 10.8)
gls_region (%) RM Oriente 44119 ( 7.8) 14124 ( 7.4) 29995 ( 8.0)
gls_region (%) RM Sur 63921 ( 11.2) 23836 ( 12.5) 40085 ( 10.6)
gls_region (%) V Región de Valparaíso 55411 ( 9.8) 17762 ( 9.3) 37649 ( 10.0)
gls_region (%) VI Región del Libertador Gral. Bernardo O Higgins 33609 ( 5.9) 11260 ( 5.9) 22349 ( 5.9)
gls_region (%) VII Región del Maule 30211 ( 5.3) 9809 ( 5.1) 20402 ( 5.4)
gls_region (%) VIII Región del Bio Bio 38601 ( 6.8) 12733 ( 6.7) 25868 ( 6.9)
gls_region (%) X Región de los Lagos 19387 ( 3.4) 6445 ( 3.4) 12942 ( 3.4)
gls_region (%) XI Región Aysen del Gral. Carlos Ibañez del Campo 5383 ( 0.9) 2013 ( 1.1) 3370 ( 0.9)
gls_region (%) XII Región de Magallanes y de la Antartica Chilena 5201 ( 0.9) 1962 ( 1.0) 3239 ( 0.9)
gls_region (%) XIV Región de los Rios 8453 ( 1.5) 2961 ( 1.5) 5492 ( 1.5)
gls_region (%) XV Región de Arica y Parinacota 13991 ( 2.5) 4569 ( 2.4) 9422 ( 2.5)
gls_region (%) XVI Región del Ñuble 5835 ( 1.0) 1906 ( 1.0) 3929 ( 1.0)
tipo_termino (%) OTROS T¿RMINOS 32066 ( 5.6) 12081 ( 6.3) 19985 ( 5.3) <0.001 0.570
tipo_termino (%) SALIDA JUDICIAL 305696 ( 53.8) 68548 ( 35.9) 237148 ( 62.9)
tipo_termino (%) SALIDA NO JUDICIAL 230514 ( 40.6) 110534 ( 57.8) 119980 ( 31.8)
tipo_termino (%) [Missing] 21 ( 0.0) 2 ( 0.0) 19 ( 0.0)
agrupa_terminos (%) ACUERDO REPARATORIO 13679 ( 2.4) 2926 ( 1.5) 10753 ( 2.9) <0.001 0.966
agrupa_terminos (%) AGRUPACI¿N A OTRO CASO 28280 ( 5.0) 11361 ( 5.9) 16919 ( 4.5)
agrupa_terminos (%) ANULACI¿N ADMINISTRATIVA 1608 ( 0.3) 368 ( 0.2) 1240 ( 0.3)
agrupa_terminos (%) ARCHIVO PROVISIONAL 149674 ( 26.3) 87494 ( 45.8) 62180 ( 16.5)
agrupa_terminos (%) DECISI¿N DE NO PERSEVERAR 33205 ( 5.8) 9942 ( 5.2) 23263 ( 6.2)
agrupa_terminos (%) FACULTAD PARA NO INVESTIGAR 42251 ( 7.4) 26158 ( 13.7) 16093 ( 4.3)
agrupa_terminos (%) INCOMPETENCIA 2433 ( 0.4) 968 ( 0.5) 1465 ( 0.4)
agrupa_terminos (%) OTRAS CAUSALES DE SUSPENSI¿N 918 ( 0.2) 77 ( 0.0) 841 ( 0.2)
agrupa_terminos (%) OTRAS CAUSALES DE T¿RMINO 1260 ( 0.2) 275 ( 0.1) 985 ( 0.3)
agrupa_terminos (%) PRINCIPIO DE OPORTUNIDAD 45202 ( 8.0) 12130 ( 6.3) 33072 ( 8.8)
agrupa_terminos (%) SENTENCIA DEFINITIVA ABSOLUTORIA 11852 ( 2.1) 2898 ( 1.5) 8954 ( 2.4)
agrupa_terminos (%) SENTENCIA DEFINITIVA CONDENATORIA 157189 ( 27.7) 18790 ( 9.8) 138399 ( 36.7)
agrupa_terminos (%) SOBRESEIMIENTO DEFINITIVO 28288 ( 5.0) 6697 ( 3.5) 21591 ( 5.7)
agrupa_terminos (%) SOBRESEIMIENTO DEFINITIVO 240 44628 ( 7.9) 9547 ( 5.0) 35081 ( 9.3)
agrupa_terminos (%) SOBRESEIMIENTO TEMPORAL 657 ( 0.1) 143 ( 0.1) 514 ( 0.1)
agrupa_terminos (%) SUSPENSI¿N CONDICIONAL DEL PROCEDIMIENTO 7152 ( 1.3) 1389 ( 0.7) 5763 ( 1.5)
agrupa_terminos (%) [Missing] 21 ( 0.0) 2 ( 0.0) 19 ( 0.0)
gls_materia (%) ABANDONO DE ARMAS O ELEMENTOS SUJETAS A CONTROL. ART. 14 A. 8 ( 0.0) 4 ( 0.0) 4 ( 0.0) <0.001 1.286
gls_materia (%) ABANDONO DE CÓNYUGE O DE PARIENTES ENFERMOS. ART. 352. 13 ( 0.0) 6 ( 0.0) 7 ( 0.0)
gls_materia (%) ABANDONO DE NIÑOS 41 ( 0.0) 1 ( 0.0) 40 ( 0.0)
gls_materia (%) ABANDONO O MALTRATO ANIMAL ART.291 BIS. 205 ( 0.0) 92 ( 0.0) 113 ( 0.0)
gls_materia (%) ABIGEATO 251 ( 0.0) 97 ( 0.1) 154 ( 0.0)
gls_materia (%) ABORTO COMETIDO POR FACULTATIVO POR CAUSALES NO REGULADAS 1 ( 0.0) 1 ( 0.0) 0 ( 0.0)
gls_materia (%) ABORTO CONSENTIDO POR CAUSLAES N/REGULADAS ART 342 N 3 Y 344 21 ( 0.0) 7 ( 0.0) 14 ( 0.0)
gls_materia (%) ABORTO SIN CONSENTIMIENTO 17 ( 0.0) 15 ( 0.0) 2 ( 0.0)
gls_materia (%) ABUSO DE FIRMA EN BLANCO 8 ( 0.0) 6 ( 0.0) 2 ( 0.0)
gls_materia (%) ABUSO SEX C/CONTACTO CORP. A MENOR DE 14 AÑOS ART 366 BIS 1061 ( 0.2) 121 ( 0.1) 940 ( 0.2)
gls_materia (%) ABUSO SEX MAYOR 14/MENOR 18 CON CIRCUNS ESTUPRO ART 366 INC2 181 ( 0.0) 76 ( 0.0) 105 ( 0.0)
gls_materia (%) ABUSO SEX MAYOR DE 14 AÑOS POR SORPRESA Y/O S/CONSENTIM. ART 1 ( 0.0) 1 ( 0.0) 0 ( 0.0)
gls_materia (%) ABUSO SEX. S/CONTAC MAYOR 14 MENOR 18 ART 366 QUAT INC 3,4,5 314 ( 0.1) 116 ( 0.1) 198 ( 0.1)
gls_materia (%) ABUSO SEX. S/CONTACTO CORP. MENOR 14 ART 366 QUAT. INC 1 Y 2 603 ( 0.1) 75 ( 0.0) 528 ( 0.1)
gls_materia (%) ABUSO SEXUAL ADULTO 4 ( 0.0) 2 ( 0.0) 2 ( 0.0)
gls_materia (%) ABUSO SEXUAL CALIFICADO (CON OBJETOS O ANIMALES)ART.365 BIS 36 ( 0.0) 23 ( 0.0) 13 ( 0.0)
gls_materia (%) ABUSO SEXUAL DE MAYOR DE 14 (CON CIRC. DE VIOLACIÓN) ART 366 955 ( 0.2) 622 ( 0.3) 333 ( 0.1)
gls_materia (%) ABUSOS CONTRA PARTICULARES 2 ( 0.0) 1 ( 0.0) 1 ( 0.0)
gls_materia (%) ABUSOS CONTRA PARTICULARES.ARTS. 255. 320 ( 0.1) 311 ( 0.2) 9 ( 0.0)
gls_materia (%) ACCESO, DIVULG.Y USO INDEB.INF.GENÉTICA CON OCASIÓN TRAT.ADN 1 ( 0.0) 1 ( 0.0) 0 ( 0.0)
gls_materia (%) ACCIDENTE CON RESUL. MUERTE O LES.GRAVES ART.196 C LEY 18290 475 ( 0.1) 283 ( 0.1) 192 ( 0.1)
gls_materia (%) ADQ. O ALMACENAMIENTO MAT.PORNOGRÁFICO INF.ART.374 BIS INC 2 19 ( 0.0) 7 ( 0.0) 12 ( 0.0)
gls_materia (%) ALLANAMIENTOS IRREGULARES 11 ( 0.0) 11 ( 0.0) 0 ( 0.0)
gls_materia (%) AMENAZA A FISCAL O DEFENSOR EN DESEMP. DE FUNC. ART 268 QUIN 10 ( 0.0) 2 ( 0.0) 8 ( 0.0)
gls_materia (%) AMENAZA CON ARMA (FALTA) ART. 494 Nº4 CÓDIGO PENAL 1723 ( 0.3) 637 ( 0.3) 1086 ( 0.3)
gls_materia (%) AMENAZA GENDARME EN DESEMP. DE FUNC. ART 15 D DL 2589 214 ( 0.0) 28 ( 0.0) 186 ( 0.0)
gls_materia (%) AMENAZAR U OFENDER A FUNC DE INVESTIGACIONES. ART. 17 quáter 110 ( 0.0) 12 ( 0.0) 98 ( 0.0)
gls_materia (%) AMENAZAS A CARABINEROS 1564 ( 0.3) 29 ( 0.0) 1535 ( 0.4)
gls_materia (%) AMENAZAS CONDIC. CONTRA PERSONAS Y PROP. ART. 296 1 y 2, 297 8342 ( 1.5) 2879 ( 1.5) 5463 ( 1.4)
gls_materia (%) AMENAZAS DE ATENTADOS CONTRA PERSONAS Y PROPIEDADES 1308 ( 0.2) 298 ( 0.2) 1010 ( 0.3)
gls_materia (%) AMENAZAS SIMPLES CONTRA PERSONAS Y PROPIEDADES ART. 296 Nº3. 81517 ( 14.3) 28137 ( 14.7) 53380 ( 14.2)
gls_materia (%) APERTURA, REG. O INTERCEPTACIÓN DE CORRESP. ART.146 Y 156 15 ( 0.0) 4 ( 0.0) 11 ( 0.0)
gls_materia (%) APREMIOS ILEG. COMETIDOS POR EMPL. PÚBLICOS. (ART. 150 D) 283 ( 0.0) 282 ( 0.1) 1 ( 0.0)
gls_materia (%) APREMIOS ILEGÍTIMOS CON CUASIDELITO (ART. 150 E N° 3) 6 ( 0.0) 5 ( 0.0) 1 ( 0.0)
gls_materia (%) APROPIACIÓN Y DISTRACCIÓN DE COTIZACIONES PREVISIONALES 918 ( 0.2) 804 ( 0.4) 114 ( 0.0)
gls_materia (%) APROPIACIÓN DE CABLES DE TENDIDO ELÉC.O DE COM.ART.443 INC 2 42 ( 0.0) 28 ( 0.0) 14 ( 0.0)
gls_materia (%) APROPIACIÓN INDEBIDA (INCL. DEPOSITARIO ALZADO) ART.470 Nº1 733 ( 0.1) 248 ( 0.1) 485 ( 0.1)
gls_materia (%) APROPIACION INDEBIDA ART.470 N°1 4302 ( 0.8) 1561 ( 0.8) 2741 ( 0.7)
gls_materia (%) ARROJAMIENTO DE PIEDRAS U OTROS OBJETOS (496 Nº26 Cód.Penal) 253 ( 0.0) 23 ( 0.0) 230 ( 0.1)
gls_materia (%) ASOCIACION ILICITA ART. 28 LEY 19.913 4 ( 0.0) 2 ( 0.0) 2 ( 0.0)
gls_materia (%) ASOCIACIONES ILÍCITAS LEY DE DROGAS ART. 16 LEY Nº 20.000. 13 ( 0.0) 0 ( 0.0) 13 ( 0.0)
gls_materia (%) ASOCIACIONES ILÍCITAS. ARTS. 292 AL 295 BIS. 16 ( 0.0) 1 ( 0.0) 15 ( 0.0)
gls_materia (%) ATENTADO A VEH.MOT. EN CIRC. CON OBJ.CONTUNDENTE U OTRO SEM. 107 ( 0.0) 26 ( 0.0) 81 ( 0.0)
gls_materia (%) ATENTADO CONTRA JEFE DE ESTADO O AUT. PÚB. ART.2 Nº3 L.18314 5 ( 0.0) 0 ( 0.0) 5 ( 0.0)
gls_materia (%) ATENTADO EXPLOSIVO O INCENDIARIO 4 ( 0.0) 2 ( 0.0) 2 ( 0.0)
gls_materia (%) ATENTADOS Y AMENAZAS CONTRA LA AUTORIDAD. ART. 261 Nº1 Y 264 252 ( 0.0) 26 ( 0.0) 226 ( 0.1)
gls_materia (%) AUXILIO AL SUICIDIO 13 ( 0.0) 13 ( 0.0) 0 ( 0.0)
gls_materia (%) BIGAMIA 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) CALUMNIA (ACCIÓN PRIVADA). ART. 412 AL 415. 14 ( 0.0) 8 ( 0.0) 6 ( 0.0)
gls_materia (%) CASTRACIÓN Y MUTILACIÓN 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) CAUSAR LA MUERTE FUNC PDI ART. 17 LOC PDI                 2 ( 0.0) 0 ( 0.0) 2 ( 0.0)
gls_materia (%) CAZA Y COMERCIALIZACIÓN DE ESPECIES PROH. (Art.31 Ley 19473) 7 ( 0.0) 0 ( 0.0) 7 ( 0.0)
gls_materia (%) CELEBRACIÓN DE CONTRATO SIMULADO. ART. 471 Nº 2. 5 ( 0.0) 4 ( 0.0) 1 ( 0.0)
gls_materia (%) COHECHO COMETIDO POR EMPLEADO PÚBLICO ART 248, 248 BIS Y 249 59 ( 0.0) 6 ( 0.0) 53 ( 0.0)
gls_materia (%) COHECHO O SOBORNO COMETIDO POR PARTICULAR. ART. 250 24 ( 0.0) 0 ( 0.0) 24 ( 0.0)
gls_materia (%) COMERCIALIZACIÓN MAT. PORNOGRÁFICO ELAB.UTIL. MEN.DE 18 AÑOS 1 ( 0.0) 1 ( 0.0) 0 ( 0.0)
gls_materia (%) COMERCIO CLANDESTINO 10 ( 0.0) 0 ( 0.0) 10 ( 0.0)
gls_materia (%) CONDUC BAJO INFLUENCIA DEL ALCOHOL ART.196 C LEY 18290 TRÁNS 3 ( 0.0) 1 ( 0.0) 2 ( 0.0)
gls_materia (%) CONDUC EBRIDAD C/LESIONS MENOS GRAVESART196 INC2 LEY TRAN 111 ( 0.0) 21 ( 0.0) 90 ( 0.0)
gls_materia (%) CONDUC EBRIEDAD C/LESIONS GRAVES ART 196 INC2LEY TRANS 143 ( 0.0) 45 ( 0.0) 98 ( 0.0)
gls_materia (%) CONDUC EBRIEDAD C/LESIONS GRAVÍSIMAS ART196 INC3LEY TRANS 22 ( 0.0) 5 ( 0.0) 17 ( 0.0)
gls_materia (%) CONDUC EBRIEDAD C/RESULT MUERTE ART196INC3 LEY TRANSITO 29 ( 0.0) 5 ( 0.0) 24 ( 0.0)
gls_materia (%) CONDUC EBRIEDAD C/SUSP LICENCIA ART 196,209 LEY TRANSITO 215 ( 0.0) 5 ( 0.0) 210 ( 0.1)
gls_materia (%) CONDUC. BAJO LA INFLUENCIA DEL ALCOHOL CAUSANDO LES.MEN.GRAV 86 ( 0.0) 20 ( 0.0) 66 ( 0.0)
gls_materia (%) CONDUC. INFLUENCIA ALCOHOL CAUSANDO LES.GRAVÍSIMAS O MUERTE 16 ( 0.0) 7 ( 0.0) 9 ( 0.0)
gls_materia (%) CONDUCC. INF. ALCOHOL CON O SIN DAÑO O LES. LEVE 193 INC 1 1045 ( 0.2) 81 ( 0.0) 964 ( 0.3)
gls_materia (%) CONDUCCIÓN BAJO LA INFLUENCIA DEL ALCOHOL CAUSANDO LES.GRAV 111 ( 0.0) 27 ( 0.0) 84 ( 0.0)
gls_materia (%) CONDUCCIÓN EBRIEDAD CON O SIN DAÑO O LES. LEVE 196 INC. 1 9057 ( 1.6) 533 ( 0.3) 8524 ( 2.3)
gls_materia (%) CONDUCCIÓN ESTADO DE EBRIEDAD CON RESULTADO DE DAÑOS. 637 ( 0.1) 94 ( 0.0) 543 ( 0.1)
gls_materia (%) CONDUCCIÓN ESTADO DE EBRIEDAD CON RESULTADO DE LESIONES. 921 ( 0.2) 283 ( 0.1) 638 ( 0.2)
gls_materia (%) CONDUCCIÓN ESTADO DE EBRIEDAD CON RESULTADO DE MUERTE 79 ( 0.0) 6 ( 0.0) 73 ( 0.0)
gls_materia (%) CONDUCCIÓN SIN LA LICENCIA DEBIDA ART 196 D LEY 18.290 1451 ( 0.3) 15 ( 0.0) 1436 ( 0.4)
gls_materia (%) CONDUCIR INFL ALCOHOL CAUSANDO LES GRAVÍSIMAS ART 193 INC 4 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) CONDUCIR INFL ALCOHOL CAUSANDO MUERTE. ART 193 INC 4 3 ( 0.0) 0 ( 0.0) 3 ( 0.0)
gls_materia (%) CONDUCIR VEHICULO CON SANCIÓN VIGENTE. ART.209 LEY 18.290. 310 ( 0.1) 0 ( 0.0) 310 ( 0.1)
gls_materia (%) CONNIVENCIA FUGA Y EVASIÓN CULPABLE DETENIDO ART. 299 A 304 5 ( 0.0) 0 ( 0.0) 5 ( 0.0)
gls_materia (%) CONSUMO DE BEBIDAS ALCOHÓLICAS EN LA VÍA PÚBLICA 2 ( 0.0) 0 ( 0.0) 2 ( 0.0)
gls_materia (%) CONSUMO DE DROGAS (ART. 41) 36 ( 0.0) 0 ( 0.0) 36 ( 0.0)
gls_materia (%) CONSUMO/PORTE DE DROGAS EN LUGARES CALIFICADOS (ART.51) 5191 ( 0.9) 5 ( 0.0) 5186 ( 1.4)
gls_materia (%) CONSUMO/PORTE EN LUG. PÚB.O PRIV. CON PREV.CONCIERTO(ART.50) 22344 ( 3.9) 12 ( 0.0) 22332 ( 5.9)
gls_materia (%) CONTRA SALUD PÚBLICA. ARTS. 313 D AL 315 y ART. 317. 7 ( 0.0) 1 ( 0.0) 6 ( 0.0)
gls_materia (%) CONTRA SALUD PUBLICA. ARTS. 313 A Y 313 B 8 ( 0.0) 4 ( 0.0) 4 ( 0.0)
gls_materia (%) CONTRA SALUD PÚBLICA. ARTS. 313 AL 318. 9 ( 0.0) 2 ( 0.0) 7 ( 0.0)
gls_materia (%) CONTRABANDO DE ESPECIES EXÓTICAS (ART. 11, LEY 20.962) 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) CONTRABANDO. INFRACCIÓN A ORDZA ADUANAS ART 168 LEY 20780 133 ( 0.0) 0 ( 0.0) 133 ( 0.0)
gls_materia (%) CORTE DESTR. ARBOLES RGMTO ART. 21 DCTO.4363 1931 Y L. BOSQ. 4 ( 0.0) 1 ( 0.0) 3 ( 0.0)
gls_materia (%) CUASIDELITO DE HOMICIDIO COMETIDO POR PROFES. DE LA SALUD 18 ( 0.0) 16 ( 0.0) 2 ( 0.0)
gls_materia (%) CUASIDELITO DE HOMICIDIO. CÓDIGO AGRUPADOR. ART. 492 INC. 2º 233 ( 0.0) 118 ( 0.1) 115 ( 0.0)
gls_materia (%) CUASIDELITO DE LESIONES COMETIDOS POR PROFES. DE LA SALUD 29 ( 0.0) 27 ( 0.0) 2 ( 0.0)
gls_materia (%) CUASIDELITO DE LESIONES. ART 490, 491 INC 2° Y 492. 3515 ( 0.6) 1832 ( 1.0) 1683 ( 0.4)
gls_materia (%) CUASIDELITO VEHICULO MOTORIZADO LEY TRANSITO 74 ( 0.0) 39 ( 0.0) 35 ( 0.0)
gls_materia (%) CULTIVO/COSECHA ESPEC. VEGETALES PRODUCTORAS ESTUPEF (ART.8) 630 ( 0.1) 9 ( 0.0) 621 ( 0.2)
gls_materia (%) DAÑO FALTA (495 N° 21 Código Penal) 1895 ( 0.3) 471 ( 0.2) 1424 ( 0.4)
gls_materia (%) DAÑOS A MONUMENTOS NACIONALES ART.38 LEY 17.288 1 ( 0.0) 1 ( 0.0) 0 ( 0.0)
gls_materia (%) DAÑOS CALIFICADOS. ART. 485 Y 486                         434 ( 0.1) 128 ( 0.1) 306 ( 0.1)
gls_materia (%) DAÑOS O APROPIACIÓN SOBRE MONUM. NAC. ART. 38-38 BIS L.17288 17 ( 0.0) 2 ( 0.0) 15 ( 0.0)
gls_materia (%) DAÑOS SIMPLES. ART. 487.                                  14896 ( 2.6) 4701 ( 2.5) 10195 ( 2.7)
gls_materia (%) DECLARACION MALICIOSA IMPSTOS 97N4(EXCEPTO INC3)COD TRIB 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) DEJAR ANIMALES SUELTOS (496 Nº 17 Código Penal) 311 ( 0.1) 187 ( 0.1) 124 ( 0.0)
gls_materia (%) DELITO DESÓRDENES PÚBLICOS ART. 269 (NO FALTA DEL CÓD 13035) 2488 ( 0.4) 36 ( 0.0) 2452 ( 0.7)
gls_materia (%) DELITOS C/ LA LIBERTAD AMBULATORIA Y DERECHO DE ASOCIACIÓN 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) DELITOS C/ LA VIDA Y PRIVACIDAD DE CONVERSACIONES 161 A Y B 30 ( 0.0) 17 ( 0.0) 13 ( 0.0)
gls_materia (%) DELITOS CONTEMPLADOS EN OTROS TEXTOS LEGALES 84 ( 0.0) 36 ( 0.0) 48 ( 0.0)
gls_materia (%) DELITOS CONTENIDOS EN LEYES DE PRENDA ESP. L.20190 Y 18690 3 ( 0.0) 0 ( 0.0) 3 ( 0.0)
gls_materia (%) DELITOS CONTRA LA LEY DE BOSQUE NATIVO. LEY 20.283 3 ( 0.0) 1 ( 0.0) 2 ( 0.0)
gls_materia (%) DELITOS CONTRA LEY DE PROPIEDAD INDUSTRIAL 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) DELITOS CONTRA LEY DE PROPIEDAD INTELECTUAL 41 ( 0.0) 0 ( 0.0) 41 ( 0.0)
gls_materia (%) DELITOS DE LA LEY DE SOCIEDADES ANÓNIMAS ART. 134 LEY 18.046 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) DELITOS MARCARIOS 3 ( 0.0) 0 ( 0.0) 3 ( 0.0)
gls_materia (%) DELITOS QUE CONTEMPLA EL CÓDIGO TRIBUTARIO. ARTS. 97 AL 114 20 ( 0.0) 0 ( 0.0) 20 ( 0.0)
gls_materia (%) DEMÁS DELITOS CONTRA LEY DE PROPIEDAD INDUSTRIAL 306 ( 0.1) 0 ( 0.0) 306 ( 0.1)
gls_materia (%) DEPOSITARIO ALZADO ART. 444 CPC                           15 ( 0.0) 5 ( 0.0) 10 ( 0.0)
gls_materia (%) DESACATO (Art. 240 Código de Procedimiento Civil) 12125 ( 2.1) 1975 ( 1.0) 10150 ( 2.7)
gls_materia (%) DESATENDER EL LLAMADO A RECLUTAMIENTO DL 2306. Art. 72 117 ( 0.0) 0 ( 0.0) 117 ( 0.0)
gls_materia (%) DESÓRDENES EN ESPECTÁCULOS PÚBLICOS 494 Nº1 CÓDIGO PENAL 353 ( 0.1) 2 ( 0.0) 351 ( 0.1)
gls_materia (%) DESTRUCCIÓN O ALTERACIÓN DE DESLINDES. ART. 462. 4 ( 0.0) 2 ( 0.0) 2 ( 0.0)
gls_materia (%) DETENCION, DESTIERRO O ARRESTO IRREGULAR ART. 148 51 ( 0.0) 38 ( 0.0) 13 ( 0.0)
gls_materia (%) DEUDOR/GTE/OTROS PERJUDICAN ACREEDORES Art463, 463bis/ter 2 ( 0.0) 0 ( 0.0) 2 ( 0.0)
gls_materia (%) DISENSIONES DOMÉSTICAS 495 Nº6 CÓDIGO PENAL 71 ( 0.0) 30 ( 0.0) 41 ( 0.0)
gls_materia (%) DISPAROS INJUSTIFICADOS EN VÍA PÚBLICA (ART 14 D INC. FINAL) 17 ( 0.0) 6 ( 0.0) 11 ( 0.0)
gls_materia (%) EJERCICIO ILEGAL DE LA PROFESIÓN. ART. 213 INC 1 39 ( 0.0) 10 ( 0.0) 29 ( 0.0)
gls_materia (%) ELABORACIÓN ILEGAL DE DROGAS O SUST. SICOT. ART.1 L.20000 7 ( 0.0) 0 ( 0.0) 7 ( 0.0)
gls_materia (%) ENSEÑANZA NO AUTORIZ. DE ARTES MARCIALES (Art. 5 Ley 18.356) 2 ( 0.0) 0 ( 0.0) 2 ( 0.0)
gls_materia (%) ESPIONAJE INFORMÁTICO ART. 2 Y 4 LEY 19223 42 ( 0.0) 13 ( 0.0) 29 ( 0.0)
gls_materia (%) ESTAFAS Y OTRAS DEFRAUDACIONES CONTRA PARTICULARES 6868 ( 1.2) 1606 ( 0.8) 5262 ( 1.4)
gls_materia (%) ESTUPRO 201 ( 0.0) 77 ( 0.0) 124 ( 0.0)
gls_materia (%) EXACCIONES ILEGALES COMETIDAS POR FUNC. PÚB. ART.157 y 241. 3 ( 0.0) 1 ( 0.0) 2 ( 0.0)
gls_materia (%) EXACCIONES ILEGALES COMETIDAS POR PARTICULARES 9 ( 0.0) 0 ( 0.0) 9 ( 0.0)
gls_materia (%) EXPENDIO DE BEBIDAS ALCOHÓLICAS A MENORES. ART.42 LEY 19925 38 ( 0.0) 16 ( 0.0) 22 ( 0.0)
gls_materia (%) EXTORSION. ART. 438. 13 ( 0.0) 6 ( 0.0) 7 ( 0.0)
gls_materia (%) EXTRANJ INGRESAN/TRATAN EGRESAR CLANDESTINAMENTE 69 DL1094 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) FABRICACIÓN, ACOPIO O COMERCIALIZACIÓN DE HILO CURADO. 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) FALSA ALARMA INCENDIO, EMERGENCIA O CALAMIDAD ART 268 BIS 15 ( 0.0) 0 ( 0.0) 15 ( 0.0)
gls_materia (%) FALSIF LICENCIAS MEDICAS O PENSIONES. ART.202 INC.2° Y 3° 5 ( 0.0) 1 ( 0.0) 4 ( 0.0)
gls_materia (%) FALSIF MONEDA (PARA BILLETES CÓD 12031).ART 162 AL 214 CP 54 ( 0.0) 9 ( 0.0) 45 ( 0.0)
gls_materia (%) FALSIF OBRAS PROTEGIDAS  LEY PROP INTELECT ART.79 BIS 45 ( 0.0) 1 ( 0.0) 44 ( 0.0)
gls_materia (%) FALSIF.PLACAS U OTROS DE INVESTIGACIONES. ART. 16 inciso 3 8 ( 0.0) 0 ( 0.0) 8 ( 0.0)
gls_materia (%) FALSIF/USO PASAPORTE O PERMISOS PORTE ARMAS ART 199 A 201 1 ( 0.0) 1 ( 0.0) 0 ( 0.0)
gls_materia (%) FALSIFICACIÓN DE BILLETES ART. 64 LEY ORGÁNICA B.CENTRAL 131 ( 0.0) 26 ( 0.0) 105 ( 0.0)
gls_materia (%) FALSIFICACIÓN LIC.DE COND. Y OTRAS FALSIF. ART.196 B L.18290 211 ( 0.0) 3 ( 0.0) 208 ( 0.1)
gls_materia (%) FALSIFICACIÓN O USO MALICIOSO DE DOC. PRIVADOS ART.197 Y 198 1791 ( 0.3) 143 ( 0.1) 1648 ( 0.4)
gls_materia (%) FALSIFICACION O USO MALICIOSO DE DOCUMENTOS PUBLICOS 536 ( 0.1) 53 ( 0.0) 483 ( 0.1)
gls_materia (%) FALSO TEST, PERJURIO O DEN.CALUM. ART.206,209,210,211 Y 212 68 ( 0.0) 19 ( 0.0) 49 ( 0.0)
gls_materia (%) FALTA DE RESPETO A LA AUTORIDAD PÚBLICA 495 Nº4 CÓDIGO PENAL 910 ( 0.2) 9 ( 0.0) 901 ( 0.2)
gls_materia (%) FEMICIDIO INTIMO ART. 390 BIS 48 ( 0.0) 28 ( 0.0) 20 ( 0.0)
gls_materia (%) FINGIMIENTO DE CARGOS O PROFESIONES. ART. 213 INC. 2 8 ( 0.0) 4 ( 0.0) 4 ( 0.0)
gls_materia (%) FRAUDE ADUANERO. INFRACCIÓN ORDZA ADUANAS ART 169 LEY 20780 5 ( 0.0) 0 ( 0.0) 5 ( 0.0)
gls_materia (%) FRAUDE DE SUBVENCIONES ART 470 N°8 11 ( 0.0) 3 ( 0.0) 8 ( 0.0)
gls_materia (%) FRAUDES AL FISCO Y ORGANISMOS DEL ESTADO. ART.239 5 ( 0.0) 0 ( 0.0) 5 ( 0.0)
gls_materia (%) GANADO QUE ENTRA A PREDIO AJENO CAUSANDO DAÑOS 5 ( 0.0) 5 ( 0.0) 0 ( 0.0)
gls_materia (%) GIRO DOLOSO CHEQUES (CUENTA CERRADA) ART. 22. DFL 707 1 ( 0.0) 1 ( 0.0) 0 ( 0.0)
gls_materia (%) GIRO DOLOSO CHEQUES (FALTA FONDOS). ART. 22. DFL 707 2 ( 0.0) 2 ( 0.0) 0 ( 0.0)
gls_materia (%) GIRO DOLOSO DE CHEQUES 94 ( 0.0) 10 ( 0.0) 84 ( 0.0)
gls_materia (%) GIRO DOLOSO DE CHEQUES AC. PENAL PÜBLICA. ART. 42. DFL 707 2 ( 0.0) 0 ( 0.0) 2 ( 0.0)
gls_materia (%) HALLAZGO DE DROGAS 126 ( 0.0) 7 ( 0.0) 119 ( 0.0)
gls_materia (%) HALLAZGO DE VEHÍCULO 1374 ( 0.2) 1251 ( 0.7) 123 ( 0.0)
gls_materia (%) HOMICIDIO 898 ( 0.2) 431 ( 0.2) 467 ( 0.1)
gls_materia (%) HOMICIDIO CALIFICADO 57 ( 0.0) 30 ( 0.0) 27 ( 0.0)
gls_materia (%) HOMICIDIO EN RIÑA O PELEA 29 ( 0.0) 6 ( 0.0) 23 ( 0.0)
gls_materia (%) HOMICIDIO GENDARME ENDESEMP. DE FUNC. ART 15 A - DL 2859 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) HURTO AGRAVADO (ART. 447 CÓDIGO PENAL) 856 ( 0.2) 90 ( 0.0) 766 ( 0.2)
gls_materia (%) HURTO DE BIENES PERTENECIENTES A REDES DE SUMINISTRO PÚBLICO 136 ( 0.0) 25 ( 0.0) 111 ( 0.0)
gls_materia (%) HURTO DE HALLAZGO 256 ( 0.0) 103 ( 0.1) 153 ( 0.0)
gls_materia (%) HURTO FALTA 494 BIS CÓDIGO PENAL 36492 ( 6.4) 1506 ( 0.8) 34986 ( 9.3)
gls_materia (%) HURTO SIMPLE 209 ( 0.0) 8 ( 0.0) 201 ( 0.1)
gls_materia (%) HURTO SIMPLE POR UN VALOR DE 4 A 40 UTM 12888 ( 2.3) 3960 ( 2.1) 8928 ( 2.4)
gls_materia (%) HURTO SIMPLE POR UN VALOR DE MEDIA A 4 UTM 36454 ( 6.4) 5270 ( 2.8) 31184 ( 8.3)
gls_materia (%) HURTO SIMPLE POR UN VALOR SOBRE 40 UTM 1289 ( 0.2) 500 ( 0.3) 789 ( 0.2)
gls_materia (%) IMPEDIR EJER. DE FUNC. A INSP. MUNIC. ART 496 N° 3 C. PENAL 2 ( 0.0) 1 ( 0.0) 1 ( 0.0)
gls_materia (%) INCENDIO 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) INCENDIO CON PELIGRO PARA LAS PERSONAS (475 Y 476 N° 1 y 2) 287 ( 0.1) 130 ( 0.1) 157 ( 0.0)
gls_materia (%) INCENDIO CON RESULTADO DE MUERTE Y/O LESIONES 155 ( 0.0) 118 ( 0.1) 37 ( 0.0)
gls_materia (%) INCENDIO DE BOSQUES Art. 476 Nº 3 Y 4. 84 ( 0.0) 59 ( 0.0) 25 ( 0.0)
gls_materia (%) INCENDIO SOLO CON DAÑOS O SIN PELIGRO DE PROP. ART.477 Y 478 793 ( 0.1) 581 ( 0.3) 212 ( 0.1)
gls_materia (%) INCESTO 9 ( 0.0) 3 ( 0.0) 6 ( 0.0)
gls_materia (%) INDUCIR A UN MENOR A ABANDONAR EL HOGAR 53 ( 0.0) 15 ( 0.0) 38 ( 0.0)
gls_materia (%) INFANTICIDIO 2 ( 0.0) 0 ( 0.0) 2 ( 0.0)
gls_materia (%) INFRAC EN PRESTACION SALUD ART 168,174 INC FINAL DS 1 SALUD 3 ( 0.0) 0 ( 0.0) 3 ( 0.0)
gls_materia (%) INFRAC LEY ORG.CONSTITUCIONAL SOBRE VOTAC POPULARES Y ESCRUT 7 ( 0.0) 1 ( 0.0) 6 ( 0.0)
gls_materia (%) INFRAC.A LA SEG.SOC. DL3500 Y 869 LS.18020,18469,18933,19728 3 ( 0.0) 0 ( 0.0) 3 ( 0.0)
gls_materia (%) INFRACC. LEY GRAL DE TELECOM ART 36 B LETRAS A, B, C Y D 19 ( 0.0) 3 ( 0.0) 16 ( 0.0)
gls_materia (%) INFRACCIÓN A LA LEY ELECTORAL. ART. 128 AL 141. 6 ( 0.0) 1 ( 0.0) 5 ( 0.0)
gls_materia (%) INFRACCIÓN ARTÍCULO 454 469 ( 0.1) 1 ( 0.0) 468 ( 0.1)
gls_materia (%) INFRACCIÓN LEY 11.564 DE MATADEROS CLANDESTINOS. ART. 1. 21 ( 0.0) 0 ( 0.0) 21 ( 0.0)
gls_materia (%) INFRACCIÓN LEY 18.892 DE PESCA. ART.135 AL 139. 14 ( 0.0) 0 ( 0.0) 14 ( 0.0)
gls_materia (%) INFRACCIÓN NORMAS INHUMACIONES Y EXHUMAC. ART.320,321 Y 322 3 ( 0.0) 0 ( 0.0) 3 ( 0.0)
gls_materia (%) INFRACCIÓN ORDENANZA ADUANAS (FRAUDE Y CONTRABANDO) ART.176. 157 ( 0.0) 0 ( 0.0) 157 ( 0.0)
gls_materia (%) INFRACCION  LEY DE QUIEBRAS. ART.218 AL 221.              1 ( 0.0) 1 ( 0.0) 0 ( 0.0)
gls_materia (%) INFRACCIONES A LA LEY DE SEG.NUCLEAR (Art.41 a 47 Ley 18302) 6 ( 0.0) 3 ( 0.0) 3 ( 0.0)
gls_materia (%) INFRACCIONES AL CÓD. AERONÁUTICO (Arts. 190, 194 bis, 195 a 4 ( 0.0) 0 ( 0.0) 4 ( 0.0)
gls_materia (%) INJURIA (ACCIÓN PRIVADA). ART. 416 AL 420. 20 ( 0.0) 14 ( 0.0) 6 ( 0.0)
gls_materia (%) INJURIAS Y CALUMNIAS POR MEDIOS DE COMUNICACIÓN SOCIAL 15 ( 0.0) 9 ( 0.0) 6 ( 0.0)
gls_materia (%) INSOLVENCIA PUNIBLE (ALZAMIENTO DE BIENES) 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) INSTAL.INDEB.SEÑALES DE TRÁN.O BARRERAS ART.196 A1 LEY 18290 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) INTERRUPCIÓN SERV. ELECT.(Art.134 DFL.1,1982,Ley Serv.Eléc.) 2 ( 0.0) 0 ( 0.0) 2 ( 0.0)
gls_materia (%) INUTILIZAR DISPOSIT MONITOREO TELEMAT ART 23 SEXIES L18216 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) LAVADO DE DINERO PERSONA NATURAL ART. 27 LEY 19.913 5 ( 0.0) 1 ( 0.0) 4 ( 0.0)
gls_materia (%) LESIONES GRAVES 7069 ( 1.2) 4774 ( 2.5) 2295 ( 0.6)
gls_materia (%) LESIONES GRAVES GRAVÍSIMAS. ART. 397 Nº1 129 ( 0.0) 81 ( 0.0) 48 ( 0.0)
gls_materia (%) LESIONES LEVES 53786 ( 9.5) 28336 ( 14.8) 25450 ( 6.7)
gls_materia (%) LESIONES LEVES 494 Nº 5 CODIGO PENAL                      597 ( 0.1) 299 ( 0.2) 298 ( 0.1)
gls_materia (%) LESIONES MENOS GRAVES 54794 ( 9.6) 23928 ( 12.5) 30866 ( 8.2)
gls_materia (%) LESIONES O DAÑOS EN FÚTBOL PROFESIONAL ART 12 INC 1 19327 9 ( 0.0) 2 ( 0.0) 7 ( 0.0)
gls_materia (%) LEY RESPONSABILIDAD PENAL PERSONAS JURIDICAS LEY 20393    2 ( 0.0) 2 ( 0.0) 0 ( 0.0)
gls_materia (%) LOTEOS IRREGULARES (Art.138 DFL 458,1975,Ley Gral.Urb.y Con) 2 ( 0.0) 2 ( 0.0) 0 ( 0.0)
gls_materia (%) LOTERIA ILEGAL, CASA JUEGO Y PRÉSTAMO PRENDA ARTS 275 AL 283 13 ( 0.0) 3 ( 0.0) 10 ( 0.0)
gls_materia (%) MALTRATO COMETIDO POR GARANTE ART. 403 BIS INC FINAL 16 ( 0.0) 0 ( 0.0) 16 ( 0.0)
gls_materia (%) MALTRATO CORPORAL A PERSONAS VULNERABLES ART 403 BIS INC 1° 139 ( 0.0) 4 ( 0.0) 135 ( 0.0)
gls_materia (%) MALTRATO DE OBRA A CARAB ART. 416 BIS COD DE JUST MILITAR 1671 ( 0.3) 16 ( 0.0) 1655 ( 0.4)
gls_materia (%) MALTRATO DE OBRA FUNC PDI CON/SIN LESIONES 17 bis LOC PDI 132 ( 0.0) 1 ( 0.0) 131 ( 0.0)
gls_materia (%) MALTRATO HABITUAL (VIOLENCIA INTRAFAMILIAR) 9439 ( 1.7) 1637 ( 0.9) 7802 ( 2.1)
gls_materia (%) MALTRATO OBRA FISCAL, DEFENSOR EN DESEMP. DE FUNC. ART. 268 10 ( 0.0) 1 ( 0.0) 9 ( 0.0)
gls_materia (%) MALTRATO OBRA GENDARME EN DESEMP. DE FUNC.ART 15 B,C DL 2859 141 ( 0.0) 9 ( 0.0) 132 ( 0.0)
gls_materia (%) MALVERSACION DE CAUDALES PUBLICOS. ARTS 233, 234, 235 y 236 31 ( 0.0) 0 ( 0.0) 31 ( 0.0)
gls_materia (%) MARCHARSE SITIO SUCESO S/AUXILIAR VÍCTIMA ART 195 INC 2 y 3 34 ( 0.0) 10 ( 0.0) 24 ( 0.0)
gls_materia (%) MATAR A CARABINERO EN EJERCICIO DE SUS FUNCS. ART.416 C.J.M. 10 ( 0.0) 0 ( 0.0) 10 ( 0.0)
gls_materia (%) MICROTRÁFICO (TRÁFICO DE PEQUEÑAS CANTID. ART. 4 LEY 20000) 5519 ( 1.0) 42 ( 0.0) 5477 ( 1.5)
gls_materia (%) MUERTES Y HALLAZGO DE CADÁVER 1525 ( 0.3) 1508 ( 0.8) 17 ( 0.0)
gls_materia (%) NEGATIVA A EFECTUARSE EXAMEN. ART. 195 BIS LEY DE TRANSITO 189 ( 0.0) 0 ( 0.0) 189 ( 0.1)
gls_materia (%) NO DAR CUENTA DE ACCIDENTE DE TRÁNSITO ART. 96 D 1 LEY 18290 112 ( 0.0) 20 ( 0.0) 92 ( 0.0)
gls_materia (%) NO DEFINIDO 6 ( 0.0) 0 ( 0.0) 6 ( 0.0)
gls_materia (%) NOMBRAMIENTOS ILEGALES 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) OBSTR INVESTIGACION POR FISCAL O ASISTENTE MP. ART.269 TER 2 ( 0.0) 0 ( 0.0) 2 ( 0.0)
gls_materia (%) OBSTRUCCIÓN A LA INVESTIGACIÓN. ART. 269 BIS. 78 ( 0.0) 22 ( 0.0) 56 ( 0.0)
gls_materia (%) OBSTRUCCIÓN A LA JUSTICIA CON OCASIÓN DE TRATAMIENTO DE ADN 3 ( 0.0) 1 ( 0.0) 2 ( 0.0)
gls_materia (%) OBTENCIÓN DE SERVICIOS SEXUALES DE MENORES. ART. 367 TER. 16 ( 0.0) 14 ( 0.0) 2 ( 0.0)
gls_materia (%) OBTENCIÓN DECLARACIONES FORZADAS ART.19 DL 2460 LEY ORG. INV 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) OBTENCION FRAUDULENTA DE CREDITOS. ART. 160. DFL 252 DE 1960 16 ( 0.0) 0 ( 0.0) 16 ( 0.0)
gls_materia (%) OCULTACIÓN DE IDENT. CONTROL PREV. 496 Nº 5 Y 12 LEY 20.931 378 ( 0.1) 6 ( 0.0) 372 ( 0.1)
gls_materia (%) OCULTACIÓN DE IDENTIDAD 496 Nº5 CÓDIGO PENAL 866 ( 0.2) 23 ( 0.0) 843 ( 0.2)
gls_materia (%) OCULTACIÓN IDENT. EN CONTROL INVESTIGATIVO 496 N°5 Y 85 CPP 130 ( 0.0) 0 ( 0.0) 130 ( 0.0)
gls_materia (%) OCULTACION O ENTR. DE INFO. FALSA A FNE. ART. 39 h) D.L. 211 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) OCULTAMIENTO DE PLACA PATENTE (ART. 192 LETRA E) 25 ( 0.0) 1 ( 0.0) 24 ( 0.0)
gls_materia (%) OFENSAS AL PUDOR (495 Nº 5 Código Penal) 418 ( 0.1) 87 ( 0.0) 331 ( 0.1)
gls_materia (%) OMISIÓN DE DENUNCIAR POR FUNCIONARIO PÚB. LEY 20.000 ART. 13 3 ( 0.0) 3 ( 0.0) 0 ( 0.0)
gls_materia (%) OPONERSE A ACCIÓN DE LA AUTORIDAD PÚBLICA O SUS AGENTES 435 ( 0.1) 0 ( 0.0) 435 ( 0.1)
gls_materia (%) OTORG. IRREGULAR DE DOCTOS (Art. 196 a Ley 18.290 Tráns) 5 ( 0.0) 1 ( 0.0) 4 ( 0.0)
gls_materia (%) OTRAS FALTAS CÓDIGO PENAL 2872 ( 0.5) 400 ( 0.2) 2472 ( 0.7)
gls_materia (%) OTRAS FALTAS LEYES ESPECIALES 4 ( 0.0) 0 ( 0.0) 4 ( 0.0)
gls_materia (%) OTRAS FALTAS Y DELITOS DE LA LEY 19.733 2 ( 0.0) 1 ( 0.0) 1 ( 0.0)
gls_materia (%) OTRAS INFRACCIÓN LEY 18.892 DE PESCA 12 ( 0.0) 0 ( 0.0) 12 ( 0.0)
gls_materia (%) OTRAS INFRACCIONES A LA LEY DEL BANCO CENTRAL 19 ( 0.0) 4 ( 0.0) 15 ( 0.0)
gls_materia (%) OTRAS INFRACCIONES A LA ORDENANZA ADUANAS. LEY 20.780 37 ( 0.0) 0 ( 0.0) 37 ( 0.0)
gls_materia (%) OTRAS INFRACCIONES AL CÓDIGO JUSTICIA MILITAR 39 ( 0.0) 10 ( 0.0) 29 ( 0.0)
gls_materia (%) OTRAS INFRACCIONES CONTRA LA LEY DE ALCOHOLES 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) OTROS ABUSOS CONTRA PARTICULARES.ART. 256,257,258,259 17 ( 0.0) 9 ( 0.0) 8 ( 0.0)
gls_materia (%) OTROS DE LOS CUASIDELITOS 42 ( 0.0) 33 ( 0.0) 9 ( 0.0)
gls_materia (%) OTROS DEL C/ ORDEN FAMILIA, MORALIDAD Pº, INTEGRIDAD SEXUAL 69 ( 0.0) 25 ( 0.0) 44 ( 0.0)
gls_materia (%) OTROS DELITOS EMPLEADOS PÚBLICOS EN DESEMPEÑO DE SUS CARGOS 14 ( 0.0) 12 ( 0.0) 2 ( 0.0)
gls_materia (%) OTROS DELITOS C/ FE PÚBLICA, FALSIFIC, FALSO TEST Y PERJURIO 31 ( 0.0) 0 ( 0.0) 31 ( 0.0)
gls_materia (%) OTROS DELITOS C/ ORDEN Y SEGURIDAD Pº COMETIDOS PARTICULARES 25 ( 0.0) 1 ( 0.0) 24 ( 0.0)
gls_materia (%) OTROS DELITOS CONTEMPLADOS EN LEY DE PROPIEDAD INTELECTUAL 941 ( 0.2) 5 ( 0.0) 936 ( 0.2)
gls_materia (%) OTROS DELITOS CONTRA LA LEY DEL TRÁNSITO 628 ( 0.1) 66 ( 0.0) 562 ( 0.1)
gls_materia (%) OTROS DELITOS CONTRA LA PROPIEDAD 567 ( 0.1) 216 ( 0.1) 351 ( 0.1)
gls_materia (%) OTROS DELITOS CONTRA LAS PERSONAS 505 ( 0.1) 319 ( 0.2) 186 ( 0.0)
gls_materia (%) OTROS DELITOS DE LA LEY 20.000 1478 ( 0.3) 13 ( 0.0) 1465 ( 0.4)
gls_materia (%) OTROS DELITOS DE LA LEY DE CONTROL DE ARMAS (LEY 17.798) 152 ( 0.0) 31 ( 0.0) 121 ( 0.0)
gls_materia (%) OTROS DELITOS LEY 19.327 SOBRE VIOLENCIA EN LOS ESTADIOS 6 ( 0.0) 1 ( 0.0) 5 ( 0.0)
gls_materia (%) OTROS DELITOS LEY DE CUENTAS CORRIENTES BANCARIAS Y CHEQUE 75 ( 0.0) 23 ( 0.0) 52 ( 0.0)
gls_materia (%) OTROS DELITOS LEY ORGÁNICA DE INVESTIGACIONES 45 ( 0.0) 3 ( 0.0) 42 ( 0.0)
gls_materia (%) OTROS DELITOS LY GRAL BANCOS.ART 110,141,142,157,159 DFL 252 23 ( 0.0) 12 ( 0.0) 11 ( 0.0)
gls_materia (%) OTROS DELITOS QUE AFECTAN DºS GARANTIDOS POR LA CONSTITUCIÓN 10 ( 0.0) 3 ( 0.0) 7 ( 0.0)
gls_materia (%) OTROS ESTRAGOS 43 ( 0.0) 22 ( 0.0) 21 ( 0.0)
gls_materia (%) OTROS HECHOS 8336 ( 1.5) 4602 ( 2.4) 3734 ( 1.0)
gls_materia (%) OTROS LEY 18.314 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) PARRICIDIO.ART. 390 inc.1°                                47 ( 0.0) 10 ( 0.0) 37 ( 0.0)
gls_materia (%) PERRO POTENCIALMENTE PELIGROSO NO INSCRITO ART 16 LEY 21.020 3 ( 0.0) 3 ( 0.0) 0 ( 0.0)
gls_materia (%) PORTAR ELEMENTOS CONOCIDAMENTE DESTINADOS A COMETER DELITO D 1142 ( 0.2) 18 ( 0.0) 1124 ( 0.3)
gls_materia (%) PORTE ARMA GUERRA, QUÍMICA,BIOLÓGICA,NUCLEAR.ART. 14 INC. 2 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) PORTE DE ARMA CORTANTE O PUNZANTE (288 bis) 8443 ( 1.5) 150 ( 0.1) 8293 ( 2.2)
gls_materia (%) PORTE DE ARMA PROHIBIDA (ART. 14 INC. 1°) 132 ( 0.0) 7 ( 0.0) 125 ( 0.0)
gls_materia (%) PORTE ILEGAL DE ARMA DE FUEGO, MUNIC.Y OTR.SUJETAS A CONTROL 1067 ( 0.2) 78 ( 0.0) 989 ( 0.3)
gls_materia (%) POSESIÓN, TENENCIA ARMA GUERRA, QUÍM, BIOL, OTRA.ART 13 INC1 3 ( 0.0) 0 ( 0.0) 3 ( 0.0)
gls_materia (%) POSESIÓN, TENENCIA, PORTE ARMAS ART 9 INC 1 LEY 17779 505 ( 0.1) 15 ( 0.0) 490 ( 0.1)
gls_materia (%) POSESIÓN, TENENCIA, PORTE DE MUNIC Y SUST QUÍM ART 9 INC 2 134 ( 0.0) 6 ( 0.0) 128 ( 0.0)
gls_materia (%) PRES. PERITOS, TEST O INTÉR.QUE FALTAREN A VERD.O DOC.FALSOS 4 ( 0.0) 0 ( 0.0) 4 ( 0.0)
gls_materia (%) PRESUNTA DESGRACIA 19571 ( 3.4) 19510 ( 10.2) 61 ( 0.0)
gls_materia (%) PRESUNTA DESGRACIA INFANTIL 1333 ( 0.2) 1297 ( 0.7) 36 ( 0.0)
gls_materia (%) PREVARICACIÓN DEL ABOGADO Y PROCURADOR ARTS. 231 y 232. 10 ( 0.0) 4 ( 0.0) 6 ( 0.0)
gls_materia (%) PREVARICACIÓN JUDICIAL Y ADMINISTRATIVA ART. 223 AL 229. 2 ( 0.0) 1 ( 0.0) 1 ( 0.0)
gls_materia (%) PRODUCCIÓN MATERIAL PORNOGRÁFICO UTILIZANDO MENOR.DE 18 AÑOS 13 ( 0.0) 6 ( 0.0) 7 ( 0.0)
gls_materia (%) PRODUCCIÓN Y TRÁFICO POR DESVÍO DE PRECURS. ART.2 LEY 20000 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) PROMOVER O FACILITAR ENTRADA O SALIDA DEL PAIS PARA PROSTIT 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) PROMOVER O FACILITAR PROSTITUCIÓN DE MENORES . ART. 367. 124 ( 0.0) 76 ( 0.0) 48 ( 0.0)
gls_materia (%) QUEBRANTAMIENTO. ART. 90 540 ( 0.1) 4 ( 0.0) 536 ( 0.1)
gls_materia (%) RECEPTACIÓN ADUANERA. INFRAC ORDZA ADUANAS ART 182 LEY 20780 10 ( 0.0) 0 ( 0.0) 10 ( 0.0)
gls_materia (%) RECEPTACIÓN. ART. 456 BIS A 9145 ( 1.6) 1005 ( 0.5) 8140 ( 2.2)
gls_materia (%) RECONOCIMIENTO MALICIOSO DE POSESIÓN REG. ART.9 DEC LEY 2695 4 ( 0.0) 2 ( 0.0) 2 ( 0.0)
gls_materia (%) REMISOS (RECLUTAMIENTO) DL 2306. Art. 73 96 ( 0.0) 0 ( 0.0) 96 ( 0.0)
gls_materia (%) RIÑA PÚBLICA 496 Nº 10 CÓDIGO PENAL 6497 ( 1.1) 741 ( 0.4) 5756 ( 1.5)
gls_materia (%) ROBO CON FUERZA DE CAJEROS AUTOMATICOS 7 ( 0.0) 0 ( 0.0) 7 ( 0.0)
gls_materia (%) ROBO CON HOMICIDIO 35 ( 0.0) 10 ( 0.0) 25 ( 0.0)
gls_materia (%) ROBO CON INTIMIDACIÓN . ART. 433, 436 INC 1º 438. 13261 ( 2.3) 8790 ( 4.6) 4471 ( 1.2)
gls_materia (%) ROBO CON LESIONES GRAVES GRAVISIMAS ART. 433 Nº 2 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) ROBO CON RET. DE VICTIMAS O LESIONES GRAVES ART. 433 Nº 3 14 ( 0.0) 11 ( 0.0) 3 ( 0.0)
gls_materia (%) ROBO CON RETENCIÓN DE VÍCTIMAS O CON LESIONES GRAVES 49 ( 0.0) 34 ( 0.0) 15 ( 0.0)
gls_materia (%) ROBO CON VIOLACIÓN. ART. 433 Nº1. 79 ( 0.0) 59 ( 0.0) 20 ( 0.0)
gls_materia (%) ROBO CON VIOLENCIA. ART.436 inc. 1º 433, 438, 439. 10894 ( 1.9) 7380 ( 3.9) 3514 ( 0.9)
gls_materia (%) ROBO DE VEHICULO MOTORIZADO ART. 443 INC. 2 2949 ( 0.5) 2515 ( 1.3) 434 ( 0.1)
gls_materia (%) ROBO EN BIENES NAC. DE USO PÚB. O SITIOS NO DESTINADOS A HAB 6974 ( 1.2) 3461 ( 1.8) 3513 ( 0.9)
gls_materia (%) ROBO EN LUGAR HABITADO O DESTINADO A LA HABITACIÓN. ART. 440 10883 ( 1.9) 4733 ( 2.5) 6150 ( 1.6)
gls_materia (%) ROBO EN LUGAR NO HABITADO. ART. 442. 9319 ( 1.6) 2072 ( 1.1) 7247 ( 1.9)
gls_materia (%) ROBO O HURTO DE MATERIAL DE GUERRA 2 ( 0.0) 0 ( 0.0) 2 ( 0.0)
gls_materia (%) ROBO POR SORPRESA. ART. 436 INC. 2° 6879 ( 1.2) 3755 ( 2.0) 3124 ( 0.8)
gls_materia (%) ROTURA DE SELLOS.ARTS. 270 y 271. 95 ( 0.0) 0 ( 0.0) 95 ( 0.0)
gls_materia (%) RUIDOS MOLESTOS 495 Nº 1 CÓDIGO PENAL 98 ( 0.0) 7 ( 0.0) 91 ( 0.0)
gls_materia (%) SABOTAJE INFORMÁTICO. ARTS. 1 Y 3 LEY 19.223. 64 ( 0.0) 26 ( 0.0) 38 ( 0.0)
gls_materia (%) SECUESTRO CON HOMICIDIO, VIOLACIÓN O LES. ART.141 INC. FINAL 33 ( 0.0) 29 ( 0.0) 4 ( 0.0)
gls_materia (%) SECUESTRO CON LESIONES 5 ( 0.0) 5 ( 0.0) 0 ( 0.0)
gls_materia (%) SECUESTRO CON VIOLACIÓN 3 ( 0.0) 3 ( 0.0) 0 ( 0.0)
gls_materia (%) SECUESTRO. ART. 141 323 ( 0.1) 265 ( 0.1) 58 ( 0.0)
gls_materia (%) SOBORNO DE FUNC PBCO EXTRANJ PERSONA NATURAL ART. 251 BIS 2 ( 0.0) 0 ( 0.0) 2 ( 0.0)
gls_materia (%) SODOMIA. ART. 365. 4 ( 0.0) 4 ( 0.0) 0 ( 0.0)
gls_materia (%) SUMINISTRO DE HIDROCARBUROS AROMÁTICOS A MEN.ART.5 LEY 20000 1 ( 0.0) 1 ( 0.0) 0 ( 0.0)
gls_materia (%) SUMINISTRO INDEBIDO DE DROGAS. ART. 7 LEY Nº 20.000. 2 ( 0.0) 0 ( 0.0) 2 ( 0.0)
gls_materia (%) SUSTRACCIÓN DE MENORES. ART. 142 69 ( 0.0) 9 ( 0.0) 60 ( 0.0)
gls_materia (%) TACHA FALSA DE FIRMA AUTÉNTICA. ART. 43. DFL 707 1 ( 0.0) 1 ( 0.0) 0 ( 0.0)
gls_materia (%) TENENCIA DE ARMAS PROHIBIDAS ART. 13                      50 ( 0.0) 4 ( 0.0) 46 ( 0.0)
gls_materia (%) TOLERANCIA AL TRÁFICO O CONSUMO DE DROGAS. ART. 12 2 ( 0.0) 0 ( 0.0) 2 ( 0.0)
gls_materia (%) TORTURAS COMETIDAS POR FUNCIONARIOS PÚBLICOS (150 A INC 1) 148 ( 0.0) 145 ( 0.1) 3 ( 0.0)
gls_materia (%) TORTURAS POR PARTICULARES AGENTES DEL ESTADO (150 A INC. 2) 15 ( 0.0) 13 ( 0.0) 2 ( 0.0)
gls_materia (%) TRÁFICO DE ARMAS (ART. 10) 5 ( 0.0) 0 ( 0.0) 5 ( 0.0)
gls_materia (%) TRAFICO DE ESPECIES VEGETALES. ART. 10 LEY 20.000 10 ( 0.0) 0 ( 0.0) 10 ( 0.0)
gls_materia (%) TRAFICO DE MIGRANTES 411 BIS INCISO 1, 2 Y 3 1 ( 0.0) 1 ( 0.0) 0 ( 0.0)
gls_materia (%) TRÁFICO DE RESIDUOS PELIGROSOS (LEY 20.920) 6 ( 0.0) 6 ( 0.0) 0 ( 0.0)
gls_materia (%) TRÁFICO ILÍCITO DE DROGAS ART. 3 LEY Nº 20.000. 1874 ( 0.3) 19 ( 0.0) 1855 ( 0.5)
gls_materia (%) TRANSP.O DISTRIB.DE GAS E INST.CLAND. ART.53/54 DFL 323,1931 1 ( 0.0) 1 ( 0.0) 0 ( 0.0)
gls_materia (%) TRANSPRTE DESECH. VERT. CLAND 192 BIS, INC. 6 LEY 20.879 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) TRATA DE PERSONAS CON FINES DE PROSTITUCIÓN. ART. 367 BIS. 12 ( 0.0) 12 ( 0.0) 0 ( 0.0)
gls_materia (%) TRATA DE PERSONAS PARA LA EXPLOTACIÓN SEXUAL ART 411 QUATER 1 ( 0.0) 1 ( 0.0) 0 ( 0.0)
gls_materia (%) TRATA PARA TRABAJOS FORZADOS Y OTROS ART411 QUATER INC1° 1 ( 0.0) 1 ( 0.0) 0 ( 0.0)
gls_materia (%) TRATOS DEGRADANTES A PERSONAS VULNERABLES. ART. 403 TER. 36 ( 0.0) 4 ( 0.0) 32 ( 0.0)
gls_materia (%) ULTRAJE PÚBLICO A LAS BUENAS COSTUMBRES POR MED.COM.SOCIAL 32 ( 0.0) 11 ( 0.0) 21 ( 0.0)
gls_materia (%) ULTRAJE PÚBLICO A LAS BUENAS COSTUMBRES. ART. 373. 125 ( 0.0) 23 ( 0.0) 102 ( 0.0)
gls_materia (%) USO FRAUDULENTO DE TARJETAS O MEDIOS DE PAGO. LEY 20.009 1747 ( 0.3) 1331 ( 0.7) 416 ( 0.1)
gls_materia (%) USO ILICITO FUEGO ART 18,22,22BIS 22 terC18S 4363 LEYBOSQUES 6 ( 0.0) 2 ( 0.0) 4 ( 0.0)
gls_materia (%) USO UNIFORME O INSIGNIAS FFAA O CARABINEROS DE CHILE 2 ( 0.0) 0 ( 0.0) 2 ( 0.0)
gls_materia (%) USO,FACILITACIÓN O TRANSPORTE DE HILO CURADO. 4 ( 0.0) 0 ( 0.0) 4 ( 0.0)
gls_materia (%) USURA. ART. 472. 2 ( 0.0) 2 ( 0.0) 0 ( 0.0)
gls_materia (%) USURPACION DE AGUAS. ART. 459. 13 ( 0.0) 3 ( 0.0) 10 ( 0.0)
gls_materia (%) USURPACIÓN DE ATRIBUCIONES DE EMPLEADOS PÚB. Y JUDICIALES 42 ( 0.0) 9 ( 0.0) 33 ( 0.0)
gls_materia (%) USURPACIÓN DE ESTADO CIVIL. ART. 354. 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) USURPACIÓN DE NOMBRE. ART. 214. 988 ( 0.2) 247 ( 0.1) 741 ( 0.2)
gls_materia (%) USURPACIÓN DE PROPIEDAD, DESCUBRIMIENTO O PROD. ART.158 Nº5. 196 ( 0.0) 41 ( 0.0) 155 ( 0.0)
gls_materia (%) USURPACIÓN NO VIOLENTA. ART. 458. 287 ( 0.1) 57 ( 0.0) 230 ( 0.1)
gls_materia (%) USURPACIÓN VIOLENTA. ART. 457 INCISO PRIMERO. 52 ( 0.0) 16 ( 0.0) 36 ( 0.0)
gls_materia (%) VENTA ILICITA OBRAS PROTEGIDAS LEY PROP INTELECT  ART. 81  178 ( 0.0) 1 ( 0.0) 177 ( 0.0)
gls_materia (%) VIOLACIÓN 4 ( 0.0) 1 ( 0.0) 3 ( 0.0)
gls_materia (%) VIOLACIÓN CON HOMICIDIO O FEMICIDIO ART. 372 BIS. 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) VIOLACIÓN DE MAYOR DE 14 AÑOS. ART. 361. 1665 ( 0.3) 1203 ( 0.6) 462 ( 0.1)
gls_materia (%) VIOLACIÓN DE MENOR DE 14 AÑOS. ART. 362. 441 ( 0.1) 133 ( 0.1) 308 ( 0.1)
gls_materia (%) VIOLACIÓN DE MORADA. ART. 144 5080 ( 0.9) 1157 ( 0.6) 3923 ( 1.0)
gls_materia (%) VIOLACIÓN DE SECRETOS. ART. 246. 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_materia (%) VIOLENCIA EN LOS ESTADIOS ART 6,6A-B-D-E-F-G-H LEY 19.327 61 ( 0.0) 2 ( 0.0) 59 ( 0.0)
familia_delito (%) CUASIDELITOS 3837 ( 0.7) 2026 ( 1.1) 1811 ( 0.5) <0.001 1.114
familia_delito (%) DELITOS CONTRA LA FE PÚBLICA 15985 ( 2.8) 2518 ( 1.3) 13467 ( 3.6)
familia_delito (%) DELITOS CONTRA LA LIBERTAD E INTIMIDAD DE LAS PERSONAS 98960 ( 17.4) 32955 ( 17.2) 66005 ( 17.5)
familia_delito (%) DELITOS CONTRA LEYES DE PROPIEDAD INTELECTUAL E INDUSTRIAL 1473 ( 0.3) 7 ( 0.0) 1466 ( 0.4)
familia_delito (%) DELITOS DE JUSTICIA MILITAR 47 ( 0.0) 10 ( 0.0) 37 ( 0.0)
familia_delito (%) DELITOS DE LEYES ESPECIALES 13230 ( 2.3) 2728 ( 1.4) 10502 ( 2.8)
familia_delito (%) DELITOS DE TORTURA, MALOS TRATOS, GENOCIDIO Y LESA HUMANIDAD 453 ( 0.1) 445 ( 0.2) 8 ( 0.0)
familia_delito (%) DELITOS ECONÓMICOS Y TRIBUTARIOS 14271 ( 2.5) 4816 ( 2.5) 9455 ( 2.5)
familia_delito (%) DELITOS FUNCIONARIOS 738 ( 0.1) 394 ( 0.2) 344 ( 0.1)
familia_delito (%) DELITOS LEY DE DROGAS 9576 ( 1.7) 87 ( 0.0) 9489 ( 2.5)
familia_delito (%) DELITOS LEY DE TRÁNSITO 16101 ( 2.8) 1597 ( 0.8) 14504 ( 3.8)
familia_delito (%) DELITOS SEXUALES 5860 ( 1.0) 2621 ( 1.4) 3239 ( 0.9)
familia_delito (%) FALTAS 80854 ( 14.2) 4171 ( 2.2) 76683 ( 20.3)
familia_delito (%) HECHOS DE RELEVANCIA CRIMINAL 32265 ( 5.7) 28175 ( 14.7) 4090 ( 1.1)
familia_delito (%) HOMICIDIOS 1107 ( 0.2) 518 ( 0.3) 589 ( 0.2)
familia_delito (%) HURTOS 52088 ( 9.2) 9956 ( 5.2) 42132 ( 11.2)
familia_delito (%) LESIONES 118835 ( 20.9) 57764 ( 30.2) 61071 ( 16.2)
familia_delito (%) OTROS DELITOS 12596 ( 2.2) 369 ( 0.2) 12227 ( 3.2)
familia_delito (%) OTROS DELITOS CONTRA LA PROPIEDAD 28677 ( 5.0) 7188 ( 3.8) 21489 ( 5.7)
familia_delito (%) ROBOS 31212 ( 5.5) 20039 ( 10.5) 11173 ( 3.0)
familia_delito (%) ROBOS NO VIOLENTOS 30132 ( 5.3) 12781 ( 6.7) 17351 ( 4.6)
relacion_vifsaf (%) NO 452460 ( 79.6) 154405 ( 80.8) 298055 ( 79.0) <0.001 0.043
relacion_vifsaf (%) SI 115837 ( 20.4) 36760 ( 19.2) 79077 ( 21.0)
gls_parentesco (%) ABUELO(A) 747 ( 0.1) 31 ( 0.0) 716 ( 0.2) <0.001 0.230
gls_parentesco (%) ADOPTADO 41 ( 0.0) 17 ( 0.0) 24 ( 0.0)
gls_parentesco (%) ADOPTANTE 5 ( 0.0) 1 ( 0.0) 4 ( 0.0)
gls_parentesco (%) CONVIVIENTE 30461 ( 5.4) 13227 ( 6.9) 17234 ( 4.6)
gls_parentesco (%) CÓNYUGE 15104 ( 2.7) 3983 ( 2.1) 11121 ( 2.9)
gls_parentesco (%) CUÑADO(A) 1701 ( 0.3) 633 ( 0.3) 1068 ( 0.3)
gls_parentesco (%) EX CONVIVIENTE 21379 ( 3.8) 8104 ( 4.2) 13275 ( 3.5)
gls_parentesco (%) EX CONYUGE 1417 ( 0.2) 358 ( 0.2) 1059 ( 0.3)
gls_parentesco (%) HERMANO(A) 9836 ( 1.7) 3030 ( 1.6) 6806 ( 1.8)
gls_parentesco (%) HIJO(A) 9131 ( 1.6) 1619 ( 0.8) 7512 ( 2.0)
gls_parentesco (%) MADRASTRA 103 ( 0.0) 22 ( 0.0) 81 ( 0.0)
gls_parentesco (%) MADRE 8412 ( 1.5) 951 ( 0.5) 7461 ( 2.0)
gls_parentesco (%) MADRE HIJO COMUN 3885 ( 0.7) 1295 ( 0.7) 2590 ( 0.7)
gls_parentesco (%) MENOR DE EDAD (bajo cuidado) 44 ( 0.0) 8 ( 0.0) 36 ( 0.0)
gls_parentesco (%) MINUSVALIDO (bajo cuidado) 3 ( 0.0) 1 ( 0.0) 2 ( 0.0)
gls_parentesco (%) NIETO 352 ( 0.1) 38 ( 0.0) 314 ( 0.1)
gls_parentesco (%) No Definido 118 ( 0.0) 40 ( 0.0) 78 ( 0.0)
gls_parentesco (%) NUERA 259 ( 0.0) 91 ( 0.0) 168 ( 0.0)
gls_parentesco (%) PADRASTRO 762 ( 0.1) 217 ( 0.1) 545 ( 0.1)
gls_parentesco (%) PADRE 4264 ( 0.8) 634 ( 0.3) 3630 ( 1.0)
gls_parentesco (%) PADRE HIJO COMUN 3584 ( 0.6) 1220 ( 0.6) 2364 ( 0.6)
gls_parentesco (%) SOBRINO(A) 1451 ( 0.3) 439 ( 0.2) 1012 ( 0.3)
gls_parentesco (%) SUEGRO(A) 866 ( 0.2) 219 ( 0.1) 647 ( 0.2)
gls_parentesco (%) TIO(A) 1509 ( 0.3) 450 ( 0.2) 1059 ( 0.3)
gls_parentesco (%) YERNO 403 ( 0.1) 132 ( 0.1) 271 ( 0.1)
gls_parentesco (%) [Missing] 452460 ( 79.6) 154405 ( 80.8) 298055 ( 79.0)
gls_mottermino (%) Acoge req. proced monit y proposic multa 57060 ( 10.0) 5722 ( 3.0) 51338 ( 13.6) <0.001 0.968
gls_mottermino (%) Acuerdo Reparatorio (Art. 241 y 242) 12071 ( 2.1) 2702 ( 1.4) 9369 ( 2.5)
gls_mottermino (%) Agrupado 28281 ( 5.0) 11361 ( 5.9) 16920 ( 4.5)
gls_mottermino (%) Anulación de ingreso error de digitación 1575 ( 0.3) 354 ( 0.2) 1221 ( 0.3)
gls_mottermino (%) Anulación ingreso por delito acción priv 33 ( 0.0) 14 ( 0.0) 19 ( 0.0)
gls_mottermino (%) Archivo Provisional 149674 ( 26.3) 87494 ( 45.8) 62180 ( 16.5)
gls_mottermino (%) Decisión de no perseverar en el proced 33205 ( 5.8) 9942 ( 5.2) 23263 ( 6.2)
gls_mottermino (%) Incomp materias correspond sistema antig 87 ( 0.0) 45 ( 0.0) 42 ( 0.0)
gls_mottermino (%) Incomp tratarse materias conoc otro trib 2346 ( 0.4) 923 ( 0.5) 1423 ( 0.4)
gls_mottermino (%) Negativa investig caso autodenuncia 179 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_mottermino (%) No Inicio Investigación 42251 ( 7.4) 26158 ( 13.7) 16093 ( 4.3)
gls_mottermino (%) Otras causales de término 1255 ( 0.2) 275 ( 0.1) 980 ( 0.3)
gls_mottermino (%) Principio de Oportunidad 45202 ( 8.0) 12130 ( 6.3) 33072 ( 8.8)
gls_mottermino (%) Rechazo querella de capítulos (art. 429) 3 ( 0.0) 0 ( 0.0) 3 ( 0.0)
gls_mottermino (%) Rechazo req. Med. Seg. Opuest qte 462 2 ( 0.0) 0 ( 0.0) 2 ( 0.0)
gls_mottermino (%) S Def (no subs oport vicios form art270) 70 ( 0.0) 14 ( 0.0) 56 ( 0.0)
gls_mottermino (%) S Definit (vencim plazo suspens art 240) 44628 ( 7.9) 9547 ( 5.0) 35081 ( 9.3)
gls_mottermino (%) S. Definit (en casos del art. 465) 3 ( 0.0) 1 ( 0.0) 2 ( 0.0)
gls_mottermino (%) S. Definit (exc previo y espec pron 271) 22 ( 0.0) 8 ( 0.0) 14 ( 0.0)
gls_mottermino (%) S. Definit (susp imposic de la cond 398) 44 ( 0.0) 12 ( 0.0) 32 ( 0.0)
gls_mottermino (%) Sentencia definitiva absolutoria 11852 ( 2.1) 2898 ( 1.5) 8954 ( 2.4)
gls_mottermino (%) Sentencia definitiva condenatoria 100130 ( 17.6) 13068 ( 6.8) 87062 ( 23.1)
gls_mottermino (%) Sobres Definit (en casos del art 247) 12 ( 0.0) 2 ( 0.0) 10 ( 0.0)
gls_mottermino (%) Sobres Definitivo (causales del art 250) 28134 ( 5.0) 6660 ( 3.5) 21474 ( 5.7)
gls_mottermino (%) Término requerimiento internacional 3 ( 0.0) 0 ( 0.0) 3 ( 0.0)
gls_mottermino (%) [Missing] 10353 ( 1.8) 1835 ( 1.0) 8518 ( 2.3)
gls_motsuspension (%) ACUERDO REPARATORIO 15456 ( 2.7) 3224 ( 1.7) 12232 ( 3.2) <0.001 0.237
gls_motsuspension (%) SOBRESEIMIENTO TEMPORAL 2275 ( 0.4) 495 ( 0.3) 1780 ( 0.5)
gls_motsuspension (%) SUSPENSION CONDICIONAL DEL PROCEDIMIENTO 55631 ( 9.8) 11826 ( 6.2) 43805 ( 11.6)
gls_motsuspension (%) SUSPENSION PROCED. ART. 10 10 ( 0.0) 0 ( 0.0) 10 ( 0.0)
gls_motsuspension (%) SUSPENSION PROCED. ART. 458 1719 ( 0.3) 138 ( 0.1) 1581 ( 0.4)
gls_motsuspension (%) [Missing] 493206 ( 86.8) 175482 ( 91.8) 317724 ( 84.2)
gls_proctermino (%) ABREVIADO 21460 ( 3.8) 3603 ( 1.9) 17857 ( 4.7) <0.001 0.829
gls_proctermino (%) MONITORIO 57113 ( 10.0) 5729 ( 3.0) 51384 ( 13.6)
gls_proctermino (%) ORDINARIO 106814 ( 18.8) 26580 ( 13.9) 80234 ( 21.3)
gls_proctermino (%) RECLAMO 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_proctermino (%) REQUERIMIENTO INTERNACIONAL 3 ( 0.0) 0 ( 0.0) 3 ( 0.0)
gls_proctermino (%) SIMPLIFICADO 102582 ( 18.1) 14807 ( 7.7) 87775 ( 23.3)
gls_proctermino (%) SIN PROCEDIMIENTO 280324 ( 49.3) 140446 ( 73.5) 139878 ( 37.1)
gls_tipo_imputado (%) DENUNCIADO 28397 ( 5.0) 5384 ( 2.8) 23013 ( 6.1) <0.001 0.165
gls_tipo_imputado (%) IMPUTADO 538987 ( 94.8) 185542 ( 97.1) 353445 ( 93.7)
gls_tipo_imputado (%) INVESTIGADO 27 ( 0.0) 10 ( 0.0) 17 ( 0.0)
gls_tipo_imputado (%) QUERELLADO 562 ( 0.1) 95 ( 0.0) 467 ( 0.1)
gls_tipo_imputado (%) SOSPECHOSO 234 ( 0.0) 45 ( 0.0) 189 ( 0.1)
gls_tipo_imputado (%) TESTIGO 90 ( 0.0) 89 ( 0.0) 1 ( 0.0)
lugar_ocurrencia (%) BIENES NACIONALES USO PUBLICO 221138 ( 38.9) 79544 ( 41.6) 141594 ( 37.5) <0.001 0.453
lugar_ocurrencia (%) ESTABLECIMIENTO COMERCIAL 91267 ( 16.1) 11902 ( 6.2) 79365 ( 21.0)
lugar_ocurrencia (%) ESTABLECIMIENTO DE DIVERSION 1853 ( 0.3) 805 ( 0.4) 1048 ( 0.3)
lugar_ocurrencia (%) ESTABLECIMIENTO EDUCACIONAL 3503 ( 0.6) 1282 ( 0.7) 2221 ( 0.6)
lugar_ocurrencia (%) ESTABLECIMIENTO PRODUCTIVO 8204 ( 1.4) 3238 ( 1.7) 4966 ( 1.3)
lugar_ocurrencia (%) LUGAR HABITADO O DESTINADO A LA HABITACION Y SUS DEPENDENCIAS 213180 ( 37.5) 83821 ( 43.8) 129359 ( 34.3)
lugar_ocurrencia (%) ORGANIZACION DE SEGURIDAD / JUSTICIA 12246 ( 2.2) 4372 ( 2.3) 7874 ( 2.1)
lugar_ocurrencia (%) ORGANIZACION PUBLICA Y/O SOCIAL 7376 ( 1.3) 3070 ( 1.6) 4306 ( 1.1)
lugar_ocurrencia (%) OTROS LUGARES NO CLASIFICADOS 5664 ( 1.0) 2308 ( 1.2) 3356 ( 0.9)
lugar_ocurrencia (%) [Missing] 3866 ( 0.7) 823 ( 0.4) 3043 ( 0.8)
gls_sitiosuceso (%) ANEXOS VIVIENDA 1920 ( 0.3) 584 ( 0.3) 1336 ( 0.4) <0.001 0.510
gls_sitiosuceso (%) AUTOSERVICIO 36710 ( 6.5) 2504 ( 1.3) 34206 ( 9.1)
gls_sitiosuceso (%) BOMBEROS 21 ( 0.0) 8 ( 0.0) 13 ( 0.0)
gls_sitiosuceso (%) CAJERO AUTOMATICO 536 ( 0.1) 323 ( 0.2) 213 ( 0.1)
gls_sitiosuceso (%) CARRETERAS Y CAMINOS 12485 ( 2.2) 3371 ( 1.8) 9114 ( 2.4)
gls_sitiosuceso (%) CEMENTERIOS 226 ( 0.0) 82 ( 0.0) 144 ( 0.0)
gls_sitiosuceso (%) CENTRALES DE APUESTAS 72 ( 0.0) 27 ( 0.0) 45 ( 0.0)
gls_sitiosuceso (%) CENTRO ESPECTACULOS 291 ( 0.1) 99 ( 0.1) 192 ( 0.1)
gls_sitiosuceso (%) CENTRO RECREATIVO 526 ( 0.1) 204 ( 0.1) 322 ( 0.1)
gls_sitiosuceso (%) CENTRO SOCIAL 873 ( 0.2) 413 ( 0.2) 460 ( 0.1)
gls_sitiosuceso (%) CENTROS CULTURALES 66 ( 0.0) 19 ( 0.0) 47 ( 0.0)
gls_sitiosuceso (%) CENTROS DE ASISTENCIA MEDICA 3626 ( 0.6) 1731 ( 0.9) 1895 ( 0.5)
gls_sitiosuceso (%) CENTROS DE CULTO 241 ( 0.0) 48 ( 0.0) 193 ( 0.1)
gls_sitiosuceso (%) CENTROS DE JUEGOS 200 ( 0.0) 87 ( 0.0) 113 ( 0.0)
gls_sitiosuceso (%) CERRO 135 ( 0.0) 35 ( 0.0) 100 ( 0.0)
gls_sitiosuceso (%) COMERCIO MENOR 8248 ( 1.5) 1339 ( 0.7) 6909 ( 1.8)
gls_sitiosuceso (%) CUERPO DE AGUA 27 ( 0.0) 6 ( 0.0) 21 ( 0.0)
gls_sitiosuceso (%) CURSO DE AGUA 25 ( 0.0) 11 ( 0.0) 14 ( 0.0)
gls_sitiosuceso (%) DEFENSORIA 10 ( 0.0) 2 ( 0.0) 8 ( 0.0)
gls_sitiosuceso (%) DISCOTEQUE / PUB 1175 ( 0.2) 535 ( 0.3) 640 ( 0.2)
gls_sitiosuceso (%) EMPRESA / COMPAÑIA 4178 ( 0.7) 1536 ( 0.8) 2642 ( 0.7)
gls_sitiosuceso (%) ESCOLAR 2900 ( 0.5) 1114 ( 0.6) 1786 ( 0.5)
gls_sitiosuceso (%) ESTABLECIMIENTO FINANCIERO 1997 ( 0.4) 576 ( 0.3) 1421 ( 0.4)
gls_sitiosuceso (%) ESTABLECIMIENTOS DE ALIMENTACION 4109 ( 0.7) 911 ( 0.5) 3198 ( 0.8)
gls_sitiosuceso (%) ESTACIONAMIENTO ABIERTO 461 ( 0.1) 192 ( 0.1) 269 ( 0.1)
gls_sitiosuceso (%) ESTACIONAMIENTO CERRADO 282 ( 0.0) 146 ( 0.1) 136 ( 0.0)
gls_sitiosuceso (%) EXPENDIO DE BEBIDAS ALCOHOLICAS 462 ( 0.1) 127 ( 0.1) 335 ( 0.1)
gls_sitiosuceso (%) FERIAS LIBRES 505 ( 0.1) 153 ( 0.1) 352 ( 0.1)
gls_sitiosuceso (%) FISCALIA 66 ( 0.0) 19 ( 0.0) 47 ( 0.0)
gls_sitiosuceso (%) INDUSTRIA 3274 ( 0.6) 1436 ( 0.8) 1838 ( 0.5)
gls_sitiosuceso (%) MAR 115 ( 0.0) 44 ( 0.0) 71 ( 0.0)
gls_sitiosuceso (%) MINAS Y PIQUES MINEROS 38 ( 0.0) 10 ( 0.0) 28 ( 0.0)
gls_sitiosuceso (%) PARQUE / PLAZA 1220 ( 0.2) 446 ( 0.2) 774 ( 0.2)
gls_sitiosuceso (%) PLAYA 366 ( 0.1) 142 ( 0.1) 224 ( 0.1)
gls_sitiosuceso (%) PRE-ESCOLAR 265 ( 0.0) 45 ( 0.0) 220 ( 0.1)
gls_sitiosuceso (%) PREDIO RURAL 3402 ( 0.6) 1324 ( 0.7) 2078 ( 0.6)
gls_sitiosuceso (%) PROSTIBULOS 114 ( 0.0) 57 ( 0.0) 57 ( 0.0)
gls_sitiosuceso (%) PUENTES 30 ( 0.0) 15 ( 0.0) 15 ( 0.0)
gls_sitiosuceso (%) RECINTOS DE GENDARMERIA 8527 ( 1.5) 2797 ( 1.5) 5730 ( 1.5)
gls_sitiosuceso (%) RECINTOS FFAA 224 ( 0.0) 62 ( 0.0) 162 ( 0.0)
gls_sitiosuceso (%) RECINTOS POLICIALES 2187 ( 0.4) 1081 ( 0.6) 1106 ( 0.3)
gls_sitiosuceso (%) SERVICENTRO 2527 ( 0.4) 1153 ( 0.6) 1374 ( 0.4)
gls_sitiosuceso (%) SERVICIOS PUBLICOS 2023 ( 0.4) 652 ( 0.3) 1371 ( 0.4)
gls_sitiosuceso (%) SITIO ERIAZO PARTICULAR 1865 ( 0.3) 832 ( 0.4) 1033 ( 0.3)
gls_sitiosuceso (%) SITIO ERIAZO PUBLICO 273 ( 0.0) 129 ( 0.1) 144 ( 0.0)
gls_sitiosuceso (%) SUPERIOR 329 ( 0.1) 120 ( 0.1) 209 ( 0.1)
gls_sitiosuceso (%) TALLER 694 ( 0.1) 245 ( 0.1) 449 ( 0.1)
gls_sitiosuceso (%) TERMINALES DE TRANSPORTES 2101 ( 0.4) 878 ( 0.5) 1223 ( 0.3)
gls_sitiosuceso (%) TIENDA COMERCIAL 34455 ( 6.1) 4081 ( 2.1) 30374 ( 8.1)
gls_sitiosuceso (%) TRIBUNALES 1206 ( 0.2) 401 ( 0.2) 805 ( 0.2)
gls_sitiosuceso (%) VEHICULO EN VIA PUBLICA 6483 ( 1.1) 2686 ( 1.4) 3797 ( 1.0)
gls_sitiosuceso (%) VIA PUBLICA URBANA 198343 ( 34.9) 72118 ( 37.7) 126225 ( 33.5)
gls_sitiosuceso (%) VIVIENDA 209068 ( 36.8) 82311 ( 43.1) 126757 ( 33.6)
gls_sitiosuceso (%) VIVIENDAS TRANSITORIAS 1992 ( 0.4) 872 ( 0.5) 1120 ( 0.3)
gls_sitiosuceso (%) [Missing] 4803 ( 0.8) 1026 ( 0.5) 3777 ( 1.0)
gls_comuna (%) AISEN 1314 ( 0.2) 491 ( 0.3) 823 ( 0.2) <0.001 0.205
gls_comuna (%) ALGARROBO 443 ( 0.1) 139 ( 0.1) 304 ( 0.1)
gls_comuna (%) ALHUE 74 ( 0.0) 31 ( 0.0) 43 ( 0.0)
gls_comuna (%) ALTO BIO BIO 30 ( 0.0) 17 ( 0.0) 13 ( 0.0)
gls_comuna (%) ALTO DEL CARMEN 47 ( 0.0) 19 ( 0.0) 28 ( 0.0)
gls_comuna (%) ALTO HOSPICIO 5728 ( 1.0) 1639 ( 0.9) 4089 ( 1.1)
gls_comuna (%) ANCUD 474 ( 0.1) 192 ( 0.1) 282 ( 0.1)
gls_comuna (%) ANDACOLLO 475 ( 0.1) 155 ( 0.1) 320 ( 0.1)
gls_comuna (%) ANGOL 1187 ( 0.2) 417 ( 0.2) 770 ( 0.2)
gls_comuna (%) ANTARTICA 2 ( 0.0) 0 ( 0.0) 2 ( 0.0)
gls_comuna (%) ANTOFAGASTA 14248 ( 2.5) 3869 ( 2.0) 10379 ( 2.8)
gls_comuna (%) ANTUCO 29 ( 0.0) 11 ( 0.0) 18 ( 0.0)
gls_comuna (%) ARAUCO 1285 ( 0.2) 377 ( 0.2) 908 ( 0.2)
gls_comuna (%) ARICA 13870 ( 2.4) 4532 ( 2.4) 9338 ( 2.5)
gls_comuna (%) BUIN 2508 ( 0.4) 844 ( 0.4) 1664 ( 0.4)
gls_comuna (%) BULNES 142 ( 0.0) 66 ( 0.0) 76 ( 0.0)
gls_comuna (%) CABILDO 229 ( 0.0) 76 ( 0.0) 153 ( 0.0)
gls_comuna (%) CABRERO 291 ( 0.1) 58 ( 0.0) 233 ( 0.1)
gls_comuna (%) CALAMA 8473 ( 1.5) 2256 ( 1.2) 6217 ( 1.6)
gls_comuna (%) CALBUCO 674 ( 0.1) 234 ( 0.1) 440 ( 0.1)
gls_comuna (%) CALDERA 2344 ( 0.4) 764 ( 0.4) 1580 ( 0.4)
gls_comuna (%) CALERA DE TANGO 791 ( 0.1) 301 ( 0.2) 490 ( 0.1)
gls_comuna (%) CALLE LARGA 135 ( 0.0) 44 ( 0.0) 91 ( 0.0)
gls_comuna (%) CAMARONES 30 ( 0.0) 3 ( 0.0) 27 ( 0.0)
gls_comuna (%) CAMINA 9 ( 0.0) 4 ( 0.0) 5 ( 0.0)
gls_comuna (%) CANELA 47 ( 0.0) 22 ( 0.0) 25 ( 0.0)
gls_comuna (%) CAÑETE 1126 ( 0.2) 312 ( 0.2) 814 ( 0.2)
gls_comuna (%) CARAHUE 375 ( 0.1) 128 ( 0.1) 247 ( 0.1)
gls_comuna (%) CARTAGENA 1394 ( 0.2) 518 ( 0.3) 876 ( 0.2)
gls_comuna (%) CASABLANCA 1432 ( 0.3) 447 ( 0.2) 985 ( 0.3)
gls_comuna (%) CASTRO 1499 ( 0.3) 461 ( 0.2) 1038 ( 0.3)
gls_comuna (%) CATEMU 342 ( 0.1) 79 ( 0.0) 263 ( 0.1)
gls_comuna (%) CAUQUENES 1171 ( 0.2) 434 ( 0.2) 737 ( 0.2)
gls_comuna (%) CERRILLOS 3484 ( 0.6) 1204 ( 0.6) 2280 ( 0.6)
gls_comuna (%) CERRO NAVIA 4628 ( 0.8) 1564 ( 0.8) 3064 ( 0.8)
gls_comuna (%) CHAITEN 37 ( 0.0) 13 ( 0.0) 24 ( 0.0)
gls_comuna (%) CHANCO 74 ( 0.0) 19 ( 0.0) 55 ( 0.0)
gls_comuna (%) CHAÑARAL 2238 ( 0.4) 718 ( 0.4) 1520 ( 0.4)
gls_comuna (%) CHEPICA 283 ( 0.0) 72 ( 0.0) 211 ( 0.1)
gls_comuna (%) CHIGUAYANTE 1296 ( 0.2) 538 ( 0.3) 758 ( 0.2)
gls_comuna (%) CHILE CHICO 426 ( 0.1) 167 ( 0.1) 259 ( 0.1)
gls_comuna (%) CHILLAN 3764 ( 0.7) 1182 ( 0.6) 2582 ( 0.7)
gls_comuna (%) CHILLAN VIEJO 302 ( 0.1) 116 ( 0.1) 186 ( 0.0)
gls_comuna (%) CHIMBARONGO 623 ( 0.1) 167 ( 0.1) 456 ( 0.1)
gls_comuna (%) CHOL CHOL 70 ( 0.0) 23 ( 0.0) 47 ( 0.0)
gls_comuna (%) CHONCHI 152 ( 0.0) 45 ( 0.0) 107 ( 0.0)
gls_comuna (%) CISNES 460 ( 0.1) 190 ( 0.1) 270 ( 0.1)
gls_comuna (%) COBQUECURA 27 ( 0.0) 4 ( 0.0) 23 ( 0.0)
gls_comuna (%) COCHAMO 5 ( 0.0) 3 ( 0.0) 2 ( 0.0)
gls_comuna (%) COCHRANE 288 ( 0.1) 107 ( 0.1) 181 ( 0.0)
gls_comuna (%) CODEGUA 226 ( 0.0) 78 ( 0.0) 148 ( 0.0)
gls_comuna (%) COELEMU 157 ( 0.0) 38 ( 0.0) 119 ( 0.0)
gls_comuna (%) COIHUECO 52 ( 0.0) 27 ( 0.0) 25 ( 0.0)
gls_comuna (%) COINCO 63 ( 0.0) 16 ( 0.0) 47 ( 0.0)
gls_comuna (%) COLBUN 102 ( 0.0) 34 ( 0.0) 68 ( 0.0)
gls_comuna (%) COLCHANE 9 ( 0.0) 1 ( 0.0) 8 ( 0.0)
gls_comuna (%) COLINA 7869 ( 1.4) 2570 ( 1.3) 5299 ( 1.4)
gls_comuna (%) COLLIPULLI 976 ( 0.2) 408 ( 0.2) 568 ( 0.2)
gls_comuna (%) COLTAUCO 209 ( 0.0) 61 ( 0.0) 148 ( 0.0)
gls_comuna (%) COMBARBALA 124 ( 0.0) 40 ( 0.0) 84 ( 0.0)
gls_comuna (%) CONCEPCION 7577 ( 1.3) 2400 ( 1.3) 5177 ( 1.4)
gls_comuna (%) CONCHALI 4937 ( 0.9) 1533 ( 0.8) 3404 ( 0.9)
gls_comuna (%) CONCON 1086 ( 0.2) 437 ( 0.2) 649 ( 0.2)
gls_comuna (%) CONSTITUCION 1449 ( 0.3) 505 ( 0.3) 944 ( 0.3)
gls_comuna (%) CONTULMO 39 ( 0.0) 15 ( 0.0) 24 ( 0.0)
gls_comuna (%) COPIAPO 7567 ( 1.3) 2136 ( 1.1) 5431 ( 1.4)
gls_comuna (%) COQUIMBO 7279 ( 1.3) 2679 ( 1.4) 4600 ( 1.2)
gls_comuna (%) CORONEL 4175 ( 0.7) 1396 ( 0.7) 2779 ( 0.7)
gls_comuna (%) CORRAL 26 ( 0.0) 17 ( 0.0) 9 ( 0.0)
gls_comuna (%) COYHAIQUE 2693 ( 0.5) 999 ( 0.5) 1694 ( 0.4)
gls_comuna (%) CUNCO 80 ( 0.0) 21 ( 0.0) 59 ( 0.0)
gls_comuna (%) CURACAUTIN 79 ( 0.0) 29 ( 0.0) 50 ( 0.0)
gls_comuna (%) CURACAVI 1618 ( 0.3) 547 ( 0.3) 1071 ( 0.3)
gls_comuna (%) CURACO DE VELEZ 8 ( 0.0) 2 ( 0.0) 6 ( 0.0)
gls_comuna (%) CURANILAHUE 1169 ( 0.2) 349 ( 0.2) 820 ( 0.2)
gls_comuna (%) CURARREHUE 105 ( 0.0) 44 ( 0.0) 61 ( 0.0)
gls_comuna (%) CUREPTO 38 ( 0.0) 8 ( 0.0) 30 ( 0.0)
gls_comuna (%) CURICO 8686 ( 1.5) 2614 ( 1.4) 6072 ( 1.6)
gls_comuna (%) DALCAHUE 191 ( 0.0) 55 ( 0.0) 136 ( 0.0)
gls_comuna (%) DIEGO DE ALMAGRO 1030 ( 0.2) 313 ( 0.2) 717 ( 0.2)
gls_comuna (%) DOQIHUE 255 ( 0.0) 100 ( 0.1) 155 ( 0.0)
gls_comuna (%) EL BOSQUE 6006 ( 1.1) 2128 ( 1.1) 3878 ( 1.0)
gls_comuna (%) EL CARMEN 40 ( 0.0) 7 ( 0.0) 33 ( 0.0)
gls_comuna (%) EL MONTE 1666 ( 0.3) 564 ( 0.3) 1102 ( 0.3)
gls_comuna (%) EL QUISCO 755 ( 0.1) 305 ( 0.2) 450 ( 0.1)
gls_comuna (%) EL TABO 563 ( 0.1) 212 ( 0.1) 351 ( 0.1)
gls_comuna (%) EMPEDRADO 19 ( 0.0) 8 ( 0.0) 11 ( 0.0)
gls_comuna (%) ERCILLA 43 ( 0.0) 25 ( 0.0) 18 ( 0.0)
gls_comuna (%) ESTACION CENTRAL 7182 ( 1.3) 2415 ( 1.3) 4767 ( 1.3)
gls_comuna (%) FLORIDA 80 ( 0.0) 41 ( 0.0) 39 ( 0.0)
gls_comuna (%) FREIRE 113 ( 0.0) 46 ( 0.0) 67 ( 0.0)
gls_comuna (%) FREIRINA 410 ( 0.1) 183 ( 0.1) 227 ( 0.1)
gls_comuna (%) FRESIA 53 ( 0.0) 9 ( 0.0) 44 ( 0.0)
gls_comuna (%) FRUTILLAR 329 ( 0.1) 96 ( 0.1) 233 ( 0.1)
gls_comuna (%) FUTALEUFU 30 ( 0.0) 2 ( 0.0) 28 ( 0.0)
gls_comuna (%) FUTRONO 59 ( 0.0) 17 ( 0.0) 42 ( 0.0)
gls_comuna (%) GALVARINO 35 ( 0.0) 16 ( 0.0) 19 ( 0.0)
gls_comuna (%) GENERAL LAGOS 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
gls_comuna (%) GORBEA 72 ( 0.0) 28 ( 0.0) 44 ( 0.0)
gls_comuna (%) GRANEROS 1809 ( 0.3) 579 ( 0.3) 1230 ( 0.3)
gls_comuna (%) GUAITECAS 37 ( 0.0) 11 ( 0.0) 26 ( 0.0)
gls_comuna (%) HIJUELAS 251 ( 0.0) 93 ( 0.0) 158 ( 0.0)
gls_comuna (%) HUALAIHUE 66 ( 0.0) 33 ( 0.0) 33 ( 0.0)
gls_comuna (%) HUALAQE 210 ( 0.0) 55 ( 0.0) 155 ( 0.0)
gls_comuna (%) HUALPEN 1914 ( 0.3) 585 ( 0.3) 1329 ( 0.4)
gls_comuna (%) HUALQUI 198 ( 0.0) 105 ( 0.1) 93 ( 0.0)
gls_comuna (%) HUARA 101 ( 0.0) 41 ( 0.0) 60 ( 0.0)
gls_comuna (%) HUASCO 373 ( 0.1) 139 ( 0.1) 234 ( 0.1)
gls_comuna (%) HUECHURABA 2971 ( 0.5) 864 ( 0.5) 2107 ( 0.6)
gls_comuna (%) ILLAPEL 268 ( 0.0) 78 ( 0.0) 190 ( 0.1)
gls_comuna (%) INDEPENDENCIA 3010 ( 0.5) 1163 ( 0.6) 1847 ( 0.5)
gls_comuna (%) IQUIQUE 10697 ( 1.9) 2493 ( 1.3) 8204 ( 2.2)
gls_comuna (%) ISLA DE MAIPO 1135 ( 0.2) 381 ( 0.2) 754 ( 0.2)
gls_comuna (%) ISLA DE PASCUA 1893 ( 0.3) 696 ( 0.4) 1197 ( 0.3)
gls_comuna (%) JUAN FERNANDEZ 18 ( 0.0) 6 ( 0.0) 12 ( 0.0)
gls_comuna (%) LA CALERA 1495 ( 0.3) 370 ( 0.2) 1125 ( 0.3)
gls_comuna (%) LA CISTERNA 3707 ( 0.7) 1437 ( 0.8) 2270 ( 0.6)
gls_comuna (%) LA CRUZ 239 ( 0.0) 63 ( 0.0) 176 ( 0.0)
gls_comuna (%) LA ESTRELLA 58 ( 0.0) 27 ( 0.0) 31 ( 0.0)
gls_comuna (%) LA FLORIDA 12025 ( 2.1) 3829 ( 2.0) 8196 ( 2.2)
gls_comuna (%) LA GRANJA 4920 ( 0.9) 1973 ( 1.0) 2947 ( 0.8)
gls_comuna (%) LA HIGUERA 104 ( 0.0) 31 ( 0.0) 73 ( 0.0)
gls_comuna (%) LA LIGUA 736 ( 0.1) 164 ( 0.1) 572 ( 0.2)
gls_comuna (%) LA PINTANA 9202 ( 1.6) 3811 ( 2.0) 5391 ( 1.4)
gls_comuna (%) LA REINA 2537 ( 0.4) 688 ( 0.4) 1849 ( 0.5)
gls_comuna (%) LA SERENA 8020 ( 1.4) 2748 ( 1.4) 5272 ( 1.4)
gls_comuna (%) LA UNION 715 ( 0.1) 234 ( 0.1) 481 ( 0.1)
gls_comuna (%) LAGO RANCO 51 ( 0.0) 20 ( 0.0) 31 ( 0.0)
gls_comuna (%) LAGO VERDE 27 ( 0.0) 8 ( 0.0) 19 ( 0.0)
gls_comuna (%) LAGUNA BLANCA 2 ( 0.0) 1 ( 0.0) 1 ( 0.0)
gls_comuna (%) LAJA 418 ( 0.1) 149 ( 0.1) 269 ( 0.1)
gls_comuna (%) LAMPA 3214 ( 0.6) 1422 ( 0.7) 1792 ( 0.5)
gls_comuna (%) LANCO 96 ( 0.0) 31 ( 0.0) 65 ( 0.0)
gls_comuna (%) LAS CABRAS 435 ( 0.1) 150 ( 0.1) 285 ( 0.1)
gls_comuna (%) LAS CONDES 3949 ( 0.7) 895 ( 0.5) 3054 ( 0.8)
gls_comuna (%) LAUTARO 245 ( 0.0) 66 ( 0.0) 179 ( 0.0)
gls_comuna (%) LEBU 636 ( 0.1) 259 ( 0.1) 377 ( 0.1)
gls_comuna (%) LICANTEN 298 ( 0.1) 63 ( 0.0) 235 ( 0.1)
gls_comuna (%) LIMACHE 878 ( 0.2) 256 ( 0.1) 622 ( 0.2)
gls_comuna (%) LINARES 2313 ( 0.4) 736 ( 0.4) 1577 ( 0.4)
gls_comuna (%) LITUECHE 121 ( 0.0) 29 ( 0.0) 92 ( 0.0)
gls_comuna (%) LLAILLAY 705 ( 0.1) 198 ( 0.1) 507 ( 0.1)
gls_comuna (%) LLANQUIHUE 238 ( 0.0) 82 ( 0.0) 156 ( 0.0)
gls_comuna (%) LO BARNECHEA 3028 ( 0.5) 904 ( 0.5) 2124 ( 0.6)
gls_comuna (%) LO ESPEJO 4461 ( 0.8) 1761 ( 0.9) 2700 ( 0.7)
gls_comuna (%) LO PRADO 5157 ( 0.9) 1916 ( 1.0) 3241 ( 0.9)
gls_comuna (%) LOLOL 35 ( 0.0) 8 ( 0.0) 27 ( 0.0)
gls_comuna (%) LONCOCHE 226 ( 0.0) 97 ( 0.1) 129 ( 0.0)
gls_comuna (%) LONGAVI 175 ( 0.0) 76 ( 0.0) 99 ( 0.0)
gls_comuna (%) LONQUIMAY 31 ( 0.0) 10 ( 0.0) 21 ( 0.0)
gls_comuna (%) LOS ALAMOS 234 ( 0.0) 86 ( 0.0) 148 ( 0.0)
gls_comuna (%) LOS ANDES 2407 ( 0.4) 702 ( 0.4) 1705 ( 0.5)
gls_comuna (%) LOS ANGELES 4698 ( 0.8) 1354 ( 0.7) 3344 ( 0.9)
gls_comuna (%) LOS LAGOS 94 ( 0.0) 37 ( 0.0) 57 ( 0.0)
gls_comuna (%) LOS MUERMOS 61 ( 0.0) 31 ( 0.0) 30 ( 0.0)
gls_comuna (%) LOS SAUCES 332 ( 0.1) 120 ( 0.1) 212 ( 0.1)
gls_comuna (%) LOS VILOS 1111 ( 0.2) 449 ( 0.2) 662 ( 0.2)
gls_comuna (%) LOTA 1688 ( 0.3) 597 ( 0.3) 1091 ( 0.3)
gls_comuna (%) LUMACO 77 ( 0.0) 28 ( 0.0) 49 ( 0.0)
gls_comuna (%) MACHALI 920 ( 0.2) 346 ( 0.2) 574 ( 0.2)
gls_comuna (%) MACUL 4537 ( 0.8) 1498 ( 0.8) 3039 ( 0.8)
gls_comuna (%) MAFIL 34 ( 0.0) 13 ( 0.0) 21 ( 0.0)
gls_comuna (%) MAIPU 9902 ( 1.7) 3385 ( 1.8) 6517 ( 1.7)
gls_comuna (%) MALLOA 155 ( 0.0) 39 ( 0.0) 116 ( 0.0)
gls_comuna (%) MARCHIHUE 109 ( 0.0) 34 ( 0.0) 75 ( 0.0)
gls_comuna (%) MARIA ELENA 174 ( 0.0) 52 ( 0.0) 122 ( 0.0)
gls_comuna (%) MARIA PINTO 562 ( 0.1) 184 ( 0.1) 378 ( 0.1)
gls_comuna (%) MARIQUINA 239 ( 0.0) 95 ( 0.0) 144 ( 0.0)
gls_comuna (%) MAULE 589 ( 0.1) 226 ( 0.1) 363 ( 0.1)
gls_comuna (%) MAULLIN 69 ( 0.0) 16 ( 0.0) 53 ( 0.0)
gls_comuna (%) MEJILLONES 603 ( 0.1) 280 ( 0.1) 323 ( 0.1)
gls_comuna (%) MELIPEUCO 57 ( 0.0) 23 ( 0.0) 34 ( 0.0)
gls_comuna (%) MELIPILLA 8236 ( 1.4) 3018 ( 1.6) 5218 ( 1.4)
gls_comuna (%) MOLINA 1383 ( 0.2) 458 ( 0.2) 925 ( 0.2)
gls_comuna (%) MONTE PATRIA 468 ( 0.1) 152 ( 0.1) 316 ( 0.1)
gls_comuna (%) MOSTAZAL 835 ( 0.1) 288 ( 0.2) 547 ( 0.1)
gls_comuna (%) MULCHEN 499 ( 0.1) 151 ( 0.1) 348 ( 0.1)
gls_comuna (%) NACIMIENTO 417 ( 0.1) 98 ( 0.1) 319 ( 0.1)
gls_comuna (%) NANCAGUA 468 ( 0.1) 162 ( 0.1) 306 ( 0.1)
gls_comuna (%) NATALES 732 ( 0.1) 281 ( 0.1) 451 ( 0.1)
gls_comuna (%) NAVARINO 26 ( 0.0) 7 ( 0.0) 19 ( 0.0)
gls_comuna (%) NAVIDAD 67 ( 0.0) 25 ( 0.0) 42 ( 0.0)
gls_comuna (%) NEGRETE 101 ( 0.0) 24 ( 0.0) 77 ( 0.0)
gls_comuna (%) NINHUE 12 ( 0.0) 7 ( 0.0) 5 ( 0.0)
gls_comuna (%) No Definido 4 ( 0.0) 1 ( 0.0) 3 ( 0.0)
gls_comuna (%) NOGALES 325 ( 0.1) 135 ( 0.1) 190 ( 0.1)
gls_comuna (%) NUEVA IMPERIAL 730 ( 0.1) 240 ( 0.1) 490 ( 0.1)
gls_comuna (%) ÑIQUEN 24 ( 0.0) 13 ( 0.0) 11 ( 0.0)
gls_comuna (%) ÑUÑOA 4617 ( 0.8) 1507 ( 0.8) 3110 ( 0.8)
gls_comuna (%) OHIGGINS 31 ( 0.0) 12 ( 0.0) 19 ( 0.0)
gls_comuna (%) OLIVAR 219 ( 0.0) 109 ( 0.1) 110 ( 0.0)
gls_comuna (%) OLLAGUE 3 ( 0.0) 1 ( 0.0) 2 ( 0.0)
gls_comuna (%) OLMUE 85 ( 0.0) 31 ( 0.0) 54 ( 0.0)
gls_comuna (%) OSORNO 5155 ( 0.9) 1600 ( 0.8) 3555 ( 0.9)
gls_comuna (%) OVALLE 3591 ( 0.6) 1092 ( 0.6) 2499 ( 0.7)
gls_comuna (%) PADRE DE LAS CASAS 763 ( 0.1) 356 ( 0.2) 407 ( 0.1)
gls_comuna (%) PADRE HURTADO 1763 ( 0.3) 691 ( 0.4) 1072 ( 0.3)
gls_comuna (%) PAIHUANO 110 ( 0.0) 37 ( 0.0) 73 ( 0.0)
gls_comuna (%) PAILLACO 200 ( 0.0) 56 ( 0.0) 144 ( 0.0)
gls_comuna (%) PAINE 1448 ( 0.3) 503 ( 0.3) 945 ( 0.3)
gls_comuna (%) PALENA 20 ( 0.0) 7 ( 0.0) 13 ( 0.0)
gls_comuna (%) PALMILLA 164 ( 0.0) 36 ( 0.0) 128 ( 0.0)
gls_comuna (%) PANGUIPULLI 435 ( 0.1) 172 ( 0.1) 263 ( 0.1)
gls_comuna (%) PANQUEHUE 130 ( 0.0) 37 ( 0.0) 93 ( 0.0)
gls_comuna (%) PAPUDO 44 ( 0.0) 18 ( 0.0) 26 ( 0.0)
gls_comuna (%) PAREDONES 38 ( 0.0) 16 ( 0.0) 22 ( 0.0)
gls_comuna (%) PARRAL 899 ( 0.2) 318 ( 0.2) 581 ( 0.2)
gls_comuna (%) PEDRO AGUIRRE CERDA 3995 ( 0.7) 1569 ( 0.8) 2426 ( 0.6)
gls_comuna (%) PELARCO 150 ( 0.0) 56 ( 0.0) 94 ( 0.0)
gls_comuna (%) PELLUHUE 306 ( 0.1) 96 ( 0.1) 210 ( 0.1)
gls_comuna (%) PEMUCO 22 ( 0.0) 14 ( 0.0) 8 ( 0.0)
gls_comuna (%) PENCAHUE 67 ( 0.0) 13 ( 0.0) 54 ( 0.0)
gls_comuna (%) PENCO 1559 ( 0.3) 616 ( 0.3) 943 ( 0.3)
gls_comuna (%) PEÑAFLOR 3416 ( 0.6) 1097 ( 0.6) 2319 ( 0.6)
gls_comuna (%) PEÑALOLEN 8472 ( 1.5) 3234 ( 1.7) 5238 ( 1.4)
gls_comuna (%) PERALILLO 264 ( 0.0) 74 ( 0.0) 190 ( 0.1)
gls_comuna (%) PERQUENCO 25 ( 0.0) 6 ( 0.0) 19 ( 0.0)
gls_comuna (%) PETORCA 104 ( 0.0) 29 ( 0.0) 75 ( 0.0)
gls_comuna (%) PEUMO 411 ( 0.1) 104 ( 0.1) 307 ( 0.1)
gls_comuna (%) PICA 450 ( 0.1) 146 ( 0.1) 304 ( 0.1)
gls_comuna (%) PICHIDEGUA 184 ( 0.0) 70 ( 0.0) 114 ( 0.0)
gls_comuna (%) PICHILEMU 1593 ( 0.3) 529 ( 0.3) 1064 ( 0.3)
gls_comuna (%) PINTO 97 ( 0.0) 35 ( 0.0) 62 ( 0.0)
gls_comuna (%) PIRQUE 532 ( 0.1) 233 ( 0.1) 299 ( 0.1)
gls_comuna (%) PITRUFQUEN 154 ( 0.0) 66 ( 0.0) 88 ( 0.0)
gls_comuna (%) PLACILLA 121 ( 0.0) 54 ( 0.0) 67 ( 0.0)
gls_comuna (%) PORTEZUELO 14 ( 0.0) 5 ( 0.0) 9 ( 0.0)
gls_comuna (%) PORVENIR 90 ( 0.0) 24 ( 0.0) 66 ( 0.0)
gls_comuna (%) POZO ALMONTE 1010 ( 0.2) 275 ( 0.1) 735 ( 0.2)
gls_comuna (%) PRIMAVERA 8 ( 0.0) 5 ( 0.0) 3 ( 0.0)
gls_comuna (%) PROVIDENCIA 4025 ( 0.7) 1227 ( 0.6) 2798 ( 0.7)
gls_comuna (%) PUCHUNCAVI 720 ( 0.1) 295 ( 0.2) 425 ( 0.1)
gls_comuna (%) PUCON 1542 ( 0.3) 585 ( 0.3) 957 ( 0.3)
gls_comuna (%) PUDAHUEL 10528 ( 1.9) 4073 ( 2.1) 6455 ( 1.7)
gls_comuna (%) PUENTE ALTO 16927 ( 3.0) 6026 ( 3.2) 10901 ( 2.9)
gls_comuna (%) PUERTO MONTT 6607 ( 1.2) 2145 ( 1.1) 4462 ( 1.2)
gls_comuna (%) PUERTO OCTAY 123 ( 0.0) 47 ( 0.0) 76 ( 0.0)
gls_comuna (%) PUERTO VARAS 1152 ( 0.2) 374 ( 0.2) 778 ( 0.2)
gls_comuna (%) PUMANQUE 8 ( 0.0) 6 ( 0.0) 2 ( 0.0)
gls_comuna (%) PUNITAQUI 151 ( 0.0) 52 ( 0.0) 99 ( 0.0)
gls_comuna (%) PUNTA ARENAS 4333 ( 0.8) 1643 ( 0.9) 2690 ( 0.7)
gls_comuna (%) PUQUELDON 13 ( 0.0) 2 ( 0.0) 11 ( 0.0)
gls_comuna (%) PUREN 431 ( 0.1) 169 ( 0.1) 262 ( 0.1)
gls_comuna (%) PURRANQUE 604 ( 0.1) 238 ( 0.1) 366 ( 0.1)
gls_comuna (%) PUTAENDO 186 ( 0.0) 57 ( 0.0) 129 ( 0.0)
gls_comuna (%) PUTRE 22 ( 0.0) 14 ( 0.0) 8 ( 0.0)
gls_comuna (%) PUYEHUE 44 ( 0.0) 17 ( 0.0) 27 ( 0.0)
gls_comuna (%) QUEILEN 17 ( 0.0) 7 ( 0.0) 10 ( 0.0)
gls_comuna (%) QUELLON 1232 ( 0.2) 549 ( 0.3) 683 ( 0.2)
gls_comuna (%) QUEMCHI 70 ( 0.0) 14 ( 0.0) 56 ( 0.0)
gls_comuna (%) QUILACO 53 ( 0.0) 14 ( 0.0) 39 ( 0.0)
gls_comuna (%) QUILICURA 6867 ( 1.2) 2387 ( 1.2) 4480 ( 1.2)
gls_comuna (%) QUILLECO 32 ( 0.0) 12 ( 0.0) 20 ( 0.0)
gls_comuna (%) QUILLON 232 ( 0.0) 67 ( 0.0) 165 ( 0.0)
gls_comuna (%) QUILLOTA 4114 ( 0.7) 1013 ( 0.5) 3101 ( 0.8)
gls_comuna (%) QUILPUE 2634 ( 0.5) 887 ( 0.5) 1747 ( 0.5)
gls_comuna (%) QUINCHAO 49 ( 0.0) 14 ( 0.0) 35 ( 0.0)
gls_comuna (%) QUINTA DE TILCOCO 188 ( 0.0) 76 ( 0.0) 112 ( 0.0)
gls_comuna (%) QUINTA NORMAL 3796 ( 0.7) 1434 ( 0.8) 2362 ( 0.6)
gls_comuna (%) QUINTERO 2020 ( 0.4) 735 ( 0.4) 1285 ( 0.3)
gls_comuna (%) QUIRIHUE 132 ( 0.0) 35 ( 0.0) 97 ( 0.0)
gls_comuna (%) RANCAGUA 11887 ( 2.1) 4382 ( 2.3) 7505 ( 2.0)
gls_comuna (%) RANQUIL 33 ( 0.0) 13 ( 0.0) 20 ( 0.0)
gls_comuna (%) RAUCO 92 ( 0.0) 27 ( 0.0) 65 ( 0.0)
gls_comuna (%) RECOLETA 6252 ( 1.1) 2383 ( 1.2) 3869 ( 1.0)
gls_comuna (%) RENAICO 396 ( 0.1) 177 ( 0.1) 219 ( 0.1)
gls_comuna (%) RENCA 5049 ( 0.9) 1676 ( 0.9) 3373 ( 0.9)
gls_comuna (%) RENGO 2138 ( 0.4) 584 ( 0.3) 1554 ( 0.4)
gls_comuna (%) REQUINOA 357 ( 0.1) 115 ( 0.1) 242 ( 0.1)
gls_comuna (%) RETIRO 67 ( 0.0) 26 ( 0.0) 41 ( 0.0)
gls_comuna (%) RINCONADA 166 ( 0.0) 43 ( 0.0) 123 ( 0.0)
gls_comuna (%) RIO BUENO 646 ( 0.1) 233 ( 0.1) 413 ( 0.1)
gls_comuna (%) RIO CLARO 88 ( 0.0) 38 ( 0.0) 50 ( 0.0)
gls_comuna (%) RIO HURTADO 15 ( 0.0) 5 ( 0.0) 10 ( 0.0)
gls_comuna (%) RIO IBAQEZ 23 ( 0.0) 9 ( 0.0) 14 ( 0.0)
gls_comuna (%) RIO NEGRO 254 ( 0.0) 100 ( 0.1) 154 ( 0.0)
gls_comuna (%) RIO VERDE 3 ( 0.0) 2 ( 0.0) 1 ( 0.0)
gls_comuna (%) ROMERAL 351 ( 0.1) 110 ( 0.1) 241 ( 0.1)
gls_comuna (%) SAAVEDRA 79 ( 0.0) 31 ( 0.0) 48 ( 0.0)
gls_comuna (%) SAGRADA FAMILIA 368 ( 0.1) 155 ( 0.1) 213 ( 0.1)
gls_comuna (%) SALAMANCA 185 ( 0.0) 63 ( 0.0) 122 ( 0.0)
gls_comuna (%) SAN ANTONIO 3880 ( 0.7) 1286 ( 0.7) 2594 ( 0.7)
gls_comuna (%) SAN BERNARDO 11907 ( 2.1) 4673 ( 2.4) 7234 ( 1.9)
gls_comuna (%) SAN CARLOS 380 ( 0.1) 113 ( 0.1) 267 ( 0.1)
gls_comuna (%) SAN CLEMENTE 749 ( 0.1) 203 ( 0.1) 546 ( 0.1)
gls_comuna (%) SAN ESTEBAN 295 ( 0.1) 135 ( 0.1) 160 ( 0.0)
gls_comuna (%) SAN FABIAN 20 ( 0.0) 10 ( 0.0) 10 ( 0.0)
gls_comuna (%) SAN FELIPE 2489 ( 0.4) 839 ( 0.4) 1650 ( 0.4)
gls_comuna (%) SAN FERNANDO 4961 ( 0.9) 1596 ( 0.8) 3365 ( 0.9)
gls_comuna (%) SAN IGNACIO 75 ( 0.0) 39 ( 0.0) 36 ( 0.0)
gls_comuna (%) SAN JAVIER 1165 ( 0.2) 306 ( 0.2) 859 ( 0.2)
gls_comuna (%) SAN JOAQUIN 3834 ( 0.7) 1428 ( 0.7) 2406 ( 0.6)
gls_comuna (%) SAN JOSE DE MAIPO 710 ( 0.1) 298 ( 0.2) 412 ( 0.1)
gls_comuna (%) SAN JUAN DE LA COSTA 60 ( 0.0) 23 ( 0.0) 37 ( 0.0)
gls_comuna (%) SAN MIGUEL 4601 ( 0.8) 1481 ( 0.8) 3120 ( 0.8)
gls_comuna (%) SAN NICOLAS 21 ( 0.0) 12 ( 0.0) 9 ( 0.0)
gls_comuna (%) SAN PABLO 70 ( 0.0) 29 ( 0.0) 41 ( 0.0)
gls_comuna (%) SAN PEDRO 143 ( 0.0) 63 ( 0.0) 80 ( 0.0)
gls_comuna (%) SAN PEDRO DE ATACAMA 477 ( 0.1) 148 ( 0.1) 329 ( 0.1)
gls_comuna (%) SAN PEDRO DE LA PAZ 2249 ( 0.4) 867 ( 0.5) 1382 ( 0.4)
gls_comuna (%) SAN RAFAEL 98 ( 0.0) 34 ( 0.0) 64 ( 0.0)
gls_comuna (%) SAN RAMON 4878 ( 0.9) 1635 ( 0.9) 3243 ( 0.9)
gls_comuna (%) SAN ROSENDO 36 ( 0.0) 12 ( 0.0) 24 ( 0.0)
gls_comuna (%) SAN VICENTE 2026 ( 0.4) 679 ( 0.4) 1347 ( 0.4)
gls_comuna (%) SANTA BARBARA 525 ( 0.1) 223 ( 0.1) 302 ( 0.1)
gls_comuna (%) SANTA CRUZ 2260 ( 0.4) 626 ( 0.3) 1634 ( 0.4)
gls_comuna (%) SANTA JUANA 326 ( 0.1) 121 ( 0.1) 205 ( 0.1)
gls_comuna (%) SANTA MARIA 227 ( 0.0) 73 ( 0.0) 154 ( 0.0)
gls_comuna (%) SANTIAGO 17075 ( 3.0) 5807 ( 3.0) 11268 ( 3.0)
gls_comuna (%) SANTO DOMINGO 118 ( 0.0) 26 ( 0.0) 92 ( 0.0)
gls_comuna (%) SIERRA GORDA 42 ( 0.0) 13 ( 0.0) 29 ( 0.0)
gls_comuna (%) TALAGANTE 4381 ( 0.8) 1440 ( 0.8) 2941 ( 0.8)
gls_comuna (%) TALCA 8231 ( 1.4) 2813 ( 1.5) 5418 ( 1.4)
gls_comuna (%) TALCAHUANO 4009 ( 0.7) 1332 ( 0.7) 2677 ( 0.7)
gls_comuna (%) TALTAL 1212 ( 0.2) 312 ( 0.2) 900 ( 0.2)
gls_comuna (%) TEMUCO 4709 ( 0.8) 1846 ( 1.0) 2863 ( 0.8)
gls_comuna (%) TENO 343 ( 0.1) 118 ( 0.1) 225 ( 0.1)
gls_comuna (%) TEODORO SCHMIDT 73 ( 0.0) 27 ( 0.0) 46 ( 0.0)
gls_comuna (%) TIERRA AMARILLA 476 ( 0.1) 200 ( 0.1) 276 ( 0.1)
gls_comuna (%) TIL TIL 790 ( 0.1) 281 ( 0.1) 509 ( 0.1)
gls_comuna (%) TINAUKEL 3 ( 0.0) 2 ( 0.0) 1 ( 0.0)
gls_comuna (%) TIRUA 62 ( 0.0) 26 ( 0.0) 36 ( 0.0)
gls_comuna (%) TOCOPILLA 2060 ( 0.4) 624 ( 0.3) 1436 ( 0.4)
gls_comuna (%) TOLTEN 39 ( 0.0) 14 ( 0.0) 25 ( 0.0)
gls_comuna (%) TOME 1473 ( 0.3) 478 ( 0.3) 995 ( 0.3)
gls_comuna (%) TORRES DEL PAINE 2 ( 0.0) 1 ( 0.0) 1 ( 0.0)
gls_comuna (%) TORTEL 65 ( 0.0) 10 ( 0.0) 55 ( 0.0)
gls_comuna (%) TRAIGUEN 198 ( 0.0) 68 ( 0.0) 130 ( 0.0)
gls_comuna (%) TREGUACO 32 ( 0.0) 9 ( 0.0) 23 ( 0.0)
gls_comuna (%) TUCAPEL 86 ( 0.0) 36 ( 0.0) 50 ( 0.0)
gls_comuna (%) VALDIVIA 5850 ( 1.0) 2034 ( 1.1) 3816 ( 1.0)
gls_comuna (%) VALLENAR 3206 ( 0.6) 1003 ( 0.5) 2203 ( 0.6)
gls_comuna (%) VALPARAISO 10402 ( 1.8) 3548 ( 1.9) 6854 ( 1.8)
gls_comuna (%) VICHUQUEN 38 ( 0.0) 17 ( 0.0) 21 ( 0.0)
gls_comuna (%) VICTORIA 1205 ( 0.2) 368 ( 0.2) 837 ( 0.2)
gls_comuna (%) VICUÑA 1116 ( 0.2) 319 ( 0.2) 797 ( 0.2)
gls_comuna (%) VILCUN 115 ( 0.0) 40 ( 0.0) 75 ( 0.0)
gls_comuna (%) VILLA ALEGRE 429 ( 0.1) 157 ( 0.1) 272 ( 0.1)
gls_comuna (%) VILLA ALEMANA 2256 ( 0.4) 671 ( 0.4) 1585 ( 0.4)
gls_comuna (%) VILLARRICA 1011 ( 0.2) 395 ( 0.2) 616 ( 0.2)
gls_comuna (%) VIQA DEL MAR 10056 ( 1.8) 3062 ( 1.6) 6994 ( 1.9)
gls_comuna (%) VITACURA 829 ( 0.1) 281 ( 0.1) 548 ( 0.1)
gls_comuna (%) YERBAS BUENAS 110 ( 0.0) 30 ( 0.0) 80 ( 0.0)
gls_comuna (%) YUMBEL 280 ( 0.0) 70 ( 0.0) 210 ( 0.1)
gls_comuna (%) YUNGAY 134 ( 0.0) 42 ( 0.0) 92 ( 0.0)
gls_comuna (%) ZAPALLAR 79 ( 0.0) 22 ( 0.0) 57 ( 0.0)
gls_comuna (%) [Missing] 1048 ( 0.2) 201 ( 0.1) 847 ( 0.2)
region_delito (%) I Región de Tarapaca 18057 ( 3.2) 4606 ( 2.4) 13451 ( 3.6) <0.001 0.122
region_delito (%) II Región de Antofagasta 27292 ( 4.8) 7555 ( 4.0) 19737 ( 5.2)
region_delito (%) III Región de Atacama 17691 ( 3.1) 5475 ( 2.9) 12216 ( 3.2)
region_delito (%) IV Región de Coquimbo 23064 ( 4.1) 7922 ( 4.1) 15142 ( 4.0)
region_delito (%) IX Región de la Araucanía 15573 ( 2.7) 5917 ( 3.1) 9656 ( 2.6)
region_delito (%) No Definido 4 ( 0.0) 1 ( 0.0) 3 ( 0.0)
region_delito (%) Región Metropolitana de Santiago 250012 ( 44.0) 88240 ( 46.2) 161772 ( 42.9)
region_delito (%) RM Centro Norte 18 ( 0.0) 11 ( 0.0) 7 ( 0.0)
region_delito (%) RM Occidente 13 ( 0.0) 3 ( 0.0) 10 ( 0.0)
region_delito (%) RM Oriente 9 ( 0.0) 2 ( 0.0) 7 ( 0.0)
region_delito (%) RM Sur 99 ( 0.0) 1 ( 0.0) 98 ( 0.0)
region_delito (%) V Región de Valparaíso 55331 ( 9.7) 17747 ( 9.3) 37584 ( 10.0)
region_delito (%) VI Región del Libertador Gral. Bernardo O Higgins 33490 ( 5.9) 11237 ( 5.9) 22253 ( 5.9)
region_delito (%) VII Región del Maule 30058 ( 5.3) 9753 ( 5.1) 20305 ( 5.4)
region_delito (%) VIII Región del Bio Bio 38590 ( 6.8) 12729 ( 6.7) 25861 ( 6.9)
region_delito (%) X Región de los Lagos 19392 ( 3.4) 6448 ( 3.4) 12944 ( 3.4)
region_delito (%) XI Región Aysen del Gral. Carlos Ibañez del Campo 5364 ( 0.9) 2004 ( 1.0) 3360 ( 0.9)
region_delito (%) XII Región de Magallanes y de la Antartica Chilena 5201 ( 0.9) 1966 ( 1.0) 3235 ( 0.9)
region_delito (%) XIV Región de los Rios 8409 ( 1.5) 2951 ( 1.5) 5458 ( 1.4)
region_delito (%) XV Región de Arica y Parinacota 13870 ( 2.4) 4542 ( 2.4) 9328 ( 2.5)
region_delito (%) XVI Región del Ñuble 5712 ( 1.0) 1854 ( 1.0) 3858 ( 1.0)
region_delito (%) [Missing] 1048 ( 0.2) 201 ( 0.1) 847 ( 0.2)
medidas_155 (%) SI 57377 ( 10.1) 11043 ( 5.8) 46334 ( 12.3) <0.001 0.229
medidas_155 (%) [Missing] 510920 ( 89.9) 180122 ( 94.2) 330798 ( 87.7)
medidas_pp (%) SI 22296 ( 3.9) 4559 ( 2.4) 17737 ( 4.7) <0.001 0.126
medidas_pp (%) [Missing] 546001 ( 96.1) 186606 ( 97.6) 359395 ( 95.3)
medidas_ip (%) SI 733 ( 0.1) 325 ( 0.2) 408 ( 0.1) <0.001 0.017
medidas_ip (%) [Missing] 567564 ( 99.9) 190840 ( 99.8) 376724 ( 99.9)
marca_suspension_43 (%) NO 67195 ( 11.8) 7257 ( 3.8) 59938 ( 15.9) <0.001 0.424
marca_suspension_43 (%) SI 2341 ( 0.4) 210 ( 0.1) 2131 ( 0.6)
marca_suspension_43 (%) [Missing] 498761 ( 87.8) 183698 ( 96.1) 315063 ( 83.5)
marca_pena_44 (%) SI 69536 ( 12.2) 7467 ( 3.9) 62069 ( 16.5) <0.001 0.424
marca_pena_44 (%) [Missing] 498761 ( 87.8) 183698 ( 96.1) 315063 ( 83.5)
marca_multa_45 (%) NO 35220 ( 6.2) 5729 ( 3.0) 29491 ( 7.8) <0.001 0.441
marca_multa_45 (%) SI 34316 ( 6.0) 1738 ( 0.9) 32578 ( 8.6)
marca_multa_45 (%) [Missing] 498761 ( 87.8) 183698 ( 96.1) 315063 ( 83.5)
medida_alternativa_46 (%) Libertad Vigilada 3219 ( 0.6) 390 ( 0.2) 2829 ( 0.8) <0.001 0.329
medida_alternativa_46 (%) Otra 4988 ( 0.9) 389 ( 0.2) 4599 ( 1.2)
medida_alternativa_46 (%) Reclusión Nocturna 14058 ( 2.5) 1255 ( 0.7) 12803 ( 3.4)
medida_alternativa_46 (%) Remisión Condicional 18345 ( 3.2) 1932 ( 1.0) 16413 ( 4.4)
medida_alternativa_46 (%) [Missing] 527687 ( 92.9) 187199 ( 97.9) 340488 ( 90.3)
clasificacion_pena_47 (%) Presidio Mayor grado máximo 88 ( 0.0) 40 ( 0.0) 48 ( 0.0) <0.001 0.434
clasificacion_pena_47 (%) Presidio Mayor grado medio 468 ( 0.1) 161 ( 0.1) 307 ( 0.1)
clasificacion_pena_47 (%) Presidio Mayor grado mínimo 1927 ( 0.3) 363 ( 0.2) 1564 ( 0.4)
clasificacion_pena_47 (%) Presidio Menor grado máximo 4990 ( 0.9) 723 ( 0.4) 4267 ( 1.1)
clasificacion_pena_47 (%) Presidio Menor grado medio 8798 ( 1.5) 1103 ( 0.6) 7695 ( 2.0)
clasificacion_pena_47 (%) Presidio Menor grado mínimo 29560 ( 5.2) 3737 ( 2.0) 25823 ( 6.8)
clasificacion_pena_47 (%) Presidio Perpetuo calificado 1 ( 0.0) 0 ( 0.0) 1 ( 0.0)
clasificacion_pena_47 (%) Presidio Perpetuo simple 15 ( 0.0) 3 ( 0.0) 12 ( 0.0)
clasificacion_pena_47 (%) Prisión 23689 ( 4.2) 1337 ( 0.7) 22352 ( 5.9)
clasificacion_pena_47 (%) [Missing] 498761 ( 87.8) 183698 ( 96.1) 315063 ( 83.5)
marca_suspension_51 (%) NO 74 ( 0.0) 10 ( 0.0) 64 ( 0.0) 0.001 0.011
marca_suspension_51 (%) SI 3 ( 0.0) 1 ( 0.0) 2 ( 0.0)
marca_suspension_51 (%) [Missing] 568220 (100.0) 191154 (100.0) 377066 (100.0)
marca_pena_52 (%) SI 77 ( 0.0) 11 ( 0.0) 66 ( 0.0) 0.001 0.011
marca_pena_52 (%) [Missing] 568220 (100.0) 191154 (100.0) 377066 (100.0)
marca_multa_53 (%) NO 46 ( 0.0) 8 ( 0.0) 38 ( 0.0) 0.001 0.011
marca_multa_53 (%) SI 31 ( 0.0) 3 ( 0.0) 28 ( 0.0)
marca_multa_53 (%) [Missing] 568220 (100.0) 191154 (100.0) 377066 (100.0)
medida_alternativa_54 (%) Libertad Vigilada 8 ( 0.0) 0 ( 0.0) 8 ( 0.0) 0.003 0.013
medida_alternativa_54 (%) Otra 5 ( 0.0) 0 ( 0.0) 5 ( 0.0)
medida_alternativa_54 (%) Reclusión Nocturna 17 ( 0.0) 3 ( 0.0) 14 ( 0.0)
medida_alternativa_54 (%) Remisión Condicional 15 ( 0.0) 0 ( 0.0) 15 ( 0.0)
medida_alternativa_54 (%) [Missing] 568252 (100.0) 191162 (100.0) 377090 (100.0)
clasificacion_pena_55 (%) Presidio Mayor grado medio 3 ( 0.0) 3 ( 0.0) 0 ( 0.0) <0.001 0.015
clasificacion_pena_55 (%) Presidio Mayor grado mínimo 5 ( 0.0) 0 ( 0.0) 5 ( 0.0)
clasificacion_pena_55 (%) Presidio Menor grado máximo 12 ( 0.0) 2 ( 0.0) 10 ( 0.0)
clasificacion_pena_55 (%) Presidio Menor grado medio 9 ( 0.0) 3 ( 0.0) 6 ( 0.0)
clasificacion_pena_55 (%) Presidio Menor grado mínimo 21 ( 0.0) 2 ( 0.0) 19 ( 0.0)
clasificacion_pena_55 (%) Prisión 27 ( 0.0) 1 ( 0.0) 26 ( 0.0)
clasificacion_pena_55 (%) [Missing] 568220 (100.0) 191154 (100.0) 377066 (100.0)
Note. Continuous variables are presented as Medians and Percentiles 25 and 75 were shown;
Categorical variables are presented as number (%)
rbind(
cbind(cat="Date of comission of the crime",
base_fiscalia %>% 
  dplyr::summarise(min = min(fec_comision_simple, na.rm=T),
                   p025=as.Date(quantile(unclass(fec_comision_simple), .025, na.rm=T), origin = "1970-01-01"),
                   p25=as.Date(quantile(unclass(fec_comision_simple), .25, na.rm=T), origin = "1970-01-01"),
                   p50=as.Date(quantile(unclass(fec_comision_simple), .5, na.rm=T), origin = "1970-01-01"),
                   p75=as.Date(quantile(unclass(fec_comision_simple), .75, na.rm=T), origin = "1970-01-01"),
                   p975=as.Date(quantile(unclass(fec_comision_simple), .975, na.rm=T), origin = "1970-01-01"),
            max = max(fec_comision_simple, na.rm=T))),
cbind(cat="Date of termination of the relationship",
base_fiscalia %>% 
  dplyr::summarise(min = min(termino_relacion_simple, na.rm=T),
                   p025=as.Date(quantile(unclass(termino_relacion_simple), .025, na.rm=T), origin = "1970-01-01"),
                   p25=as.Date(quantile(unclass(termino_relacion_simple), .25, na.rm=T), origin = "1970-01-01"),
                   p50=as.Date(quantile(unclass(termino_relacion_simple), .5, na.rm=T), origin = "1970-01-01"),
                   p75=as.Date(quantile(unclass(termino_relacion_simple), .75, na.rm=T), origin = "1970-01-01"),
                   p975=as.Date(quantile(unclass(termino_relacion_simple), .975, na.rm=T), origin = "1970-01-01"),
            max = max(termino_relacion_simple, na.rm=T))),
cbind(cat="Date of cbiorelacion",
base_fiscalia %>% 
  dplyr::summarise(min = min(fec_cbiorelacion_simple, na.rm=T),
                   p025=as.Date(quantile(unclass(fec_cbiorelacion_simple), .025, na.rm=T), origin = "1970-01-01"),
                   p25=as.Date(quantile(unclass(fec_cbiorelacion_simple), .25, na.rm=T), origin = "1970-01-01"),
                   p50=as.Date(quantile(unclass(fec_cbiorelacion_simple), .5, na.rm=T), origin = "1970-01-01"),
                   p75=as.Date(quantile(unclass(fec_cbiorelacion_simple), .75, na.rm=T), origin = "1970-01-01"),
                   p975=as.Date(quantile(unclass(fec_cbiorelacion_simple), .975, na.rm=T), origin = "1970-01-01"),
            max = max(fec_cbiorelacion_simple, na.rm=T))),

cbind(cat="Date of comission of the crime",
Base_fiscalia_v2 %>% 
  dplyr::summarise(min = min(fec_comision_simple, na.rm=T),
                   p025=as.Date(quantile(unclass(fec_comision_simple), .025, na.rm=T), origin = "1970-01-01"),
                   p25=as.Date(quantile(unclass(fec_comision_simple), .25, na.rm=T), origin = "1970-01-01"),
                   p50=as.Date(quantile(unclass(fec_comision_simple), .5, na.rm=T), origin = "1970-01-01"),
                   p75=as.Date(quantile(unclass(fec_comision_simple), .75, na.rm=T), origin = "1970-01-01"),
                   p975=as.Date(quantile(unclass(fec_comision_simple), .975, na.rm=T), origin = "1970-01-01"),
            max = max(fec_comision_simple, na.rm=T))),
cbind(cat="Date of termination of the relationship",
Base_fiscalia_v2 %>% 
  dplyr::summarise(min = min(termino_relacion_simple, na.rm=T),
                   p025=as.Date(quantile(unclass(termino_relacion_simple), .025, na.rm=T), origin = "1970-01-01"),
                   p25=as.Date(quantile(unclass(termino_relacion_simple), .25, na.rm=T), origin = "1970-01-01"),
                   p50=as.Date(quantile(unclass(termino_relacion_simple), .5, na.rm=T), origin = "1970-01-01"),
                   p75=as.Date(quantile(unclass(termino_relacion_simple), .75, na.rm=T), origin = "1970-01-01"),
                   p975=as.Date(quantile(unclass(termino_relacion_simple), .975, na.rm=T), origin = "1970-01-01"),
            max = max(termino_relacion_simple, na.rm=T))),
cbind(cat="Date of cbiorelacion",
Base_fiscalia_v2 %>% 
  dplyr::summarise(min = min(fec_cbiorelacion_simple, na.rm=T),
         p025=as.Date(quantile(unclass(fec_cbiorelacion_simple), .025, na.rm=T), origin = "1970-01-01"),
         p25=as.Date(quantile(unclass(fec_cbiorelacion_simple), .25, na.rm=T), origin = "1970-01-01"),
         p50=as.Date(quantile(unclass(fec_cbiorelacion_simple), .5, na.rm=T), origin = "1970-01-01"),
         p75=as.Date(quantile(unclass(fec_cbiorelacion_simple), .75, na.rm=T), origin = "1970-01-01"),
         p975=as.Date(quantile(unclass(fec_cbiorelacion_simple), .975, na.rm=T), origin = "1970-01-01"),
         max = max(fec_cbiorelacion_simple, na.rm=T))),
cbind(cat="Date of birth",
Base_fiscalia_v2 %>% 
  dplyr::summarise(min = min(fec_nacimiento_simple, na.rm=T),
         p025=as.Date(quantile(unclass(fec_nacimiento_simple), .025, na.rm=T), origin = "1970-01-01"),
         p25=as.Date(quantile(unclass(fec_nacimiento_simple), .25, na.rm=T), origin = "1970-01-01"),
         p50=as.Date(quantile(unclass(fec_nacimiento_simple), .5, na.rm=T), origin = "1970-01-01"),
         p75=as.Date(quantile(unclass(fec_nacimiento_simple), .75, na.rm=T), origin = "1970-01-01"),
         p975=as.Date(quantile(unclass(fec_nacimiento_simple), .975, na.rm=T), origin = "1970-01-01"),
         max = max(fec_nacimiento_simple, na.rm=T)))) %>% 
knitr::kable(format="html",caption= "Table 2. Summary of Dates") %>% #,col.names=c("Variables","Residential", "Ambulatory", "p-value")) %>% 
    kableExtra::kable_classic(bootstrap_options = c("striped", "hover","condensed"),font_size= 10) %>% 
  kableExtra::group_rows("Original database",1,3) %>% 
  kableExtra::group_rows("Corrected database",4,7)
Table 2. Summary of Dates
cat min p025 p25 p50 p75 p975 max
Original database
Date of comission of the crime 1900-01-01 2009-04-01 2011-12-09 2014-04-22 2016-11-14 2019-06-10 2019-12-31
Date of termination of the relationship 2002-10-24 2010-04-09 2012-06-06 2014-11-13 2017-06-06 2019-09-26 2021-07-20
Date of cbiorelacion 2002-10-24 2010-04-09 2012-06-06 2014-11-13 2017-06-06 2019-09-26 2021-07-20
Corrected database
Date of comission of the crime 1900-01-01 2009-04-01 2011-12-09 2014-04-22 2016-11-14 2019-06-10 2019-12-31
Date of termination of the relationship 2002-10-24 2010-04-09 2012-06-06 2014-11-13 2017-06-06 2019-09-26 2021-07-20
Date of cbiorelacion 2002-10-24 2010-04-09 2012-06-06 2014-11-13 2017-06-06 2019-09-26 2021-07-20
Date of birth 1855-09-14 1940-06-11 1974-12-11 1982-10-13 1988-10-17 1996-07-20 2016-07-29


Missingness

cols<-Base_fiscalia_v2[,myVars_nva] %>%
     names() #si fuera desde SPSS, sería p47_demo_medio_transp_otr

tot<-
Base_fiscalia_v2 %>%
  # dplyr::filter(resp_status=="partial") %>% 
  nrow()
#Ordenar variables
missing.values <- 
  Base_fiscalia_v2 %>%
    tidyr::gather() %>%
    dplyr::mutate(is.missing = is.na(value)) %>%
    dplyr::group_by(key, is.missing) %>%
    dplyr::summarise(num.missing = n()) %>%
    dplyr::filter(is.missing==T) %>%
    dplyr::mutate(perc_miss=num.missing/tot) %>% 
    dplyr::mutate(label_text=paste0("%= ", scales::percent(num.missing/tot, accuracy=1L),"\n N= ", format(num.missing,big.mark=","))) %>% 
    dplyr::select(-is.missing) %>% 
    dplyr::ungroup() %>% 
    dplyr::group_by(key) %>% 
    dplyr::slice(1) %>% 
    dplyr::ungroup()
## Warning: attributes are not identical across measure variables;
## they will be dropped
## `summarise()` has grouped output by 'key'. You can override using the `.groups`
## argument.
plot_miss<-
missing.values %>%
  dplyr::ungroup() %>% 
  # slice(1:29) %>% 
  ggplot() +
  geom_bar(aes(x=forcats::fct_reorder(key, perc_miss), y=perc_miss, label=label_text), stat = 'identity') +
  labs(x='variable', y="Porcentaje de perdidos", caption=paste0("Nota. Porcentaje de perdidos del total (",format(tot, big.mark=","),")")) +
  #theme(axis.text.x = element_text(angle = 45, hjust = 1, size=6))+
  theme(axis.text.x = element_blank())+
  scale_y_continuous(limits=c(0,1))+
  sjPlot::theme_sjplot()+
  coord_flip()
## Warning: Ignoring unknown aesthetics: label
   ggplotly(plot_miss, tooltip = c("label_text"))%>% layout(xaxis= list(showticklabels = T), height = 600, width=800) %>%   layout(xaxis = list(tickformat='%',  range = c(0, 1)))
## Warning: Specifying width/height in layout() is now deprecated.
## Please specify in ggplotly() or plot_ly()


Near Zero Variance

Check variables that only had one unique value (i.e. are zero variance) or predictors that have both of the following characteristics: few unique values given the sample size, and the frequency of the most common value is much more big than the second most common value.

nzv_vals <- nearZeroVar(Base_fiscalia_v2, saveMetrics = TRUE)
nzv_sorted <- dplyr::arrange(nzv_vals, desc(freqRatio))

kable(as.data.frame.TableOne(nzv_sorted), size=11, format="html",
    caption= "Table 4. Near Zero Variance",
    col.names=c("Variable", "freqRatio", "% of Unique values", "Zero Variance", "Near Zero Variance")) %>% #,col.names=c("Variables","Residential", "Ambulatory", "p-value")) %>% 
    kableExtra::kable_classic(bootstrap_options = c("striped", "hover","condensed"),font_size= 10) %>%
    kableExtra::add_footnote(c("Note. freqRatio= ratio of frequencies for the most common value over the second most common value for that variable"), notation = "none")%>%
    kableExtra::scroll_box(width = "100%", height = "375px")
Table 4. Near Zero Variance
Variable freqRatio % of Unique values Zero Variance Near Zero Variance
tipo_sujeto_vic 1664.733333 0.0014077 FALSE TRUE
gls_tipo_sujeto_vic 1664.733333 0.0014077 FALSE TRUE
idsujeto_victima 277.615385 89.6786363 FALSE FALSE
pais 268.111848 0.0035193 FALSE TRUE
fec_nacimiento 57.160494 2.8910939 FALSE TRUE
fec_nacimiento_simple 57.160494 2.8910939 FALSE TRUE
marca_suspension_43 28.703546 0.0003519 FALSE TRUE
marca_suspension_51 24.666667 0.0003519 FALSE TRUE
impcod_tiposujeto 18.980421 0.0010558 FALSE FALSE
gls_tipo_imputado 18.980421 0.0010558 FALSE FALSE
cod_sitiosuceso 10.792359 0.0026395 FALSE FALSE
cod_motsuspension 8.865668 0.0010558 FALSE FALSE
cod_region 4.518480 0.0036953 FALSE FALSE
region_delito 4.518480 0.0036953 FALSE FALSE
relacion_vifsaf 3.906006 0.0003519 FALSE FALSE
gls_motsuspension 3.599314 0.0008798 FALSE FALSE
tramos_condena_48 3.069565 0.0008798 FALSE FALSE
fec_comision 2.809524 60.2693662 FALSE FALSE
sexo 2.783323 0.0005279 FALSE FALSE
gls_proctermino 2.624413 0.0012318 FALSE FALSE
clasificacion_penarpa_2_50 2.535714 0.0007039 FALSE FALSE
cod_proctermino 2.524388 0.0014077 FALSE FALSE
idsujeto_imputado 2.303571 90.5061966 FALSE FALSE
encontrado_como_imputado 1.972809 0.0003519 FALSE FALSE
encontrado_como_victima 1.967128 0.0003519 FALSE FALSE
rut_enc_saf 1.830986 13.1679386 FALSE FALSE
clasificacion_penarpa_1_49 1.827586 0.0014077 FALSE FALSE
edad_ter_rel 1.547009 4.1240760 FALSE FALSE
iddelito 1.518519 92.9843022 FALSE FALSE
cod_mottermino 1.494797 0.0045751 FALSE FALSE
gls_mottermino 1.494797 0.0043991 FALSE FALSE
cod_delito 1.487699 0.0622914 FALSE FALSE
gls_materia 1.487699 0.0622914 FALSE FALSE
marca_multa_53 1.483871 0.0003519 FALSE FALSE
cod_parentescoimputado 1.424809 0.0043991 FALSE FALSE
gls_parentesco 1.424809 0.0043991 FALSE FALSE
tipo_termino 1.326149 0.0005279 FALSE FALSE
medida_alternativa_46 1.304951 0.0007039 FALSE FALSE
clasificacion_pena_55 1.285714 0.0010558 FALSE FALSE
termino_relacion 1.250549 0.7647410 FALSE FALSE
fec_cbiorelacion_simple 1.250549 0.7647410 FALSE FALSE
termino_relacion_simple 1.250549 0.7647410 FALSE FALSE
clasificacion_pena_47 1.247837 0.0015837 FALSE FALSE
edad_comision 1.238938 4.3167569 FALSE FALSE
fec_cbiorelacion 1.236967 7.7364477 FALSE FALSE
reg 1.229971 0.0033433 FALSE FALSE
gls_region 1.229971 0.0033433 FALSE FALSE
ruc 1.216981 87.0898491 FALSE FALSE
familia_delito 1.200839 0.0036953 FALSE FALSE
medida_alternativa_54 1.133333 0.0007039 FALSE FALSE
gls_sitiosuceso 1.054073 0.0095021 FALSE FALSE
agrupa_terminos 1.050209 0.0028154 FALSE FALSE
cod_lugarocurrencia 1.037330 0.0017596 FALSE FALSE
lugar_ocurrencia 1.037330 0.0015837 FALSE FALSE
marca_multa_45 1.026343 0.0003519 FALSE FALSE
cod_comunadelito 1.009519 0.0656347 FALSE FALSE
gls_comuna 1.008743 0.0608837 FALSE FALSE
fec_comision_simple 1.002660 0.9808252 FALSE FALSE
idrelacion 1.000000 99.9987682 FALSE FALSE
medidas_155 0.000000 0.0001760 TRUE TRUE
medidas_pp 0.000000 0.0001760 TRUE TRUE
medidas_ip 0.000000 0.0001760 TRUE TRUE
marca_pena_44 0.000000 0.0001760 TRUE TRUE
marca_pena_52 0.000000 0.0001760 TRUE TRUE
tramos_condena_56 0.000000 0.0000000 TRUE TRUE
clasificacion_penarpa_1_57 0.000000 0.0000000 TRUE TRUE
clasificacion_penarpa_2_58 0.000000 0.0000000 TRUE TRUE
Note. freqRatio= ratio of frequencies for the most common value over the second most common value for that variable


Times as accused

  • 366 people that is found as accused and as a victim at the same time. Meanwhile, we considered them as accused.
#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_
base_fiscalia_acc_imp<-
Base_fiscalia_v2 %>% 
  dplyr::mutate(accused=dplyr::case_when(encontrado_como_victima=="SI" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                 encontrado_como_victima=="NO" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                 T~"VICTIMA")) %>% 
  dplyr::filter(accused=="IMPUTADO") %>% 
  dplyr::group_by(rut_enc_saf) %>% 
  dplyr::count() %>% 
  ungroup()
#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_

p<-
base_fiscalia_acc_imp %>% 
  dplyr::left_join(CONS_C1_df_dup_SEP_2020[,c("hash_key","dup")] %>% distinct(hash_key, .keep_all = T),by=c("rut_enc_saf"="hash_key")) %>% ggplot(aes(x=n), alpha=.7)+
  geom_histogram_interactive(bins=120)+
  geom_vline(aes(xintercept=median(base_fiscalia_acc_imp$n)), color="darkred", linetype="dashed")+
  geom_vline(aes(xintercept=quantile(base_fiscalia_acc_imp$n, .99)), color="darkmagenta", linetype="solid")+
  geom_vline(aes(xintercept=quantile(base_fiscalia_acc_imp$n, .95)), color="darkblue", linetype="dotted")+
  sjPlot::theme_sjplot2() +
  #facet_wrap(~motivodeegreso_mod_imp)+
labs(y = "Frequency",x="Records as an imputed", caption= paste0("Blue dotted line=", quantile(base_fiscalia_acc_imp$n, .95)," records; Violet solid line=",quantile(base_fiscalia_acc_imp$n, .99)," records; Red dashed line= Median=",median(base_fiscalia_acc_imp$n)," records; Maximum=",max(base_fiscalia_acc_imp$n)," records")) 

p
Figure 1. Distribution of records in which a user is declared as an accused

Figure 1. Distribution of records in which a user is declared as an accused

paste0("Percentage of HASHs that have records as accused: ",
scales::percent(
base_fiscalia_acc_imp %>% 
    dplyr::left_join(CONS_C1_df_dup_SEP_2020[,c("hash_key","dup")] %>% distinct(hash_key, .keep_all = T),by=c("rut_enc_saf"="hash_key")) %>%  distinct(rut_enc_saf) %>% nrow()/CONS_C1_df_dup_SEP_2020[,c("hash_key","dup")] %>% distinct(hash_key, .keep_all = T) %>% nrow(),
  accuracy=.01
  )
  )
## [1] "Percentage of HASHs that have records as accused: 74.71%"


Times as victim

#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_
base_fiscalia_acc_vic<-
Base_fiscalia_v2 %>% 
  dplyr::mutate(accused=dplyr::case_when(encontrado_como_victima=="SI" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                 encontrado_como_victima=="NO" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                 T~"VICTIMA")) %>% 
  dplyr::filter(accused=="VICTIMA") %>% 
  dplyr::group_by(rut_enc_saf) %>% 
  dplyr::count() %>% 
  ungroup()
#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_


p2<-
base_fiscalia_acc_vic %>% 
  dplyr::left_join(CONS_C1_df_dup_SEP_2020[,c("hash_key","dup")] %>% distinct(hash_key, .keep_all = T),by=c("rut_enc_saf"="hash_key")) %>% ggplot(aes(x=n), alpha=.7)+
  geom_histogram_interactive(bins=120)+
  geom_vline(aes(xintercept=median(base_fiscalia_acc_vic$n)), color="darkred", linetype="dashed")+
  geom_vline(aes(xintercept=quantile(base_fiscalia_acc_vic$n, .99)), color="darkmagenta", linetype="solid")+
  geom_vline(aes(xintercept=quantile(base_fiscalia_acc_vic$n, .95)), color="darkblue", linetype="dotted")+
  sjPlot::theme_sjplot2() +
  #facet_wrap(~motivodeegreso_mod_imp)+
labs(y = "Frequency",x="Records as a victim", caption= paste0("Blue dotted line=", quantile(base_fiscalia_acc_vic$n, .95)," records; Violet solid line=",quantile(base_fiscalia_acc_vic$n, .99)," records; Red dashed line= Median=",median(base_fiscalia_acc_vic$n)," records; Maximum=",max(base_fiscalia_acc_vic$n)," records"))
# xlim(c(-1,2000))

p2
Figure 2. Distribution of records in which a user is declared as a Victim

Figure 2. Distribution of records in which a user is declared as a Victim

paste0("Percentage of HASHs that have records as victims: ",
scales::percent(
base_fiscalia_acc_vic %>% 
    dplyr::left_join(CONS_C1_df_dup_SEP_2020[,c("hash_key","dup")] %>% distinct(hash_key, .keep_all = T),by=c("rut_enc_saf"="hash_key")) %>%  distinct(rut_enc_saf) %>% nrow()/CONS_C1_df_dup_SEP_2020[,c("hash_key","dup")] %>% distinct(hash_key, .keep_all = T) %>% nrow(),
accuracy=.01
  )
)
## [1] "Percentage of HASHs that have records as victims: 67.40%"


Structure

The hypothetized structure would be HASHs (rut_enc_saf), RUCs (ruc), the combination of an specific accused (idsujeto_imputado) and victim (idsujeto_victima), ending with a relationship (idrelacion) as the result of this combination with an specific type of crime/offence (id_delito) in a determined court case.


Some counts of different values by each variable.


id_suj_vic<-
cbind(cat="Number of entries by ID of victim",
Base_fiscalia_v2 %>%
    count(idsujeto_victima) %>% 
    summarise(min=min(n), max=max(n), mean=mean(n), median=median(n), p025=quantile(n, .025), p25=quantile(n, .25), p75=quantile(n,.75), p975=quantile(n, .975)))
#podría agrupar al resto. De hecho, hay un ID que agrupa a 18,045 filas, que es el id sujeto ==0

if(no_mostrar==0){
Base_fiscalia_v2 %>%
    dplyr::filter(ruc %in% as.character(unlist(base_fiscalia %>%
                                                 dplyr::filter(idsujeto_victima==0) %>%
                                                 dplyr::select(ruc)))) %>% 
    dplyr::group_by(idrelacion) %>% 
    summarise(n=n()) %>% 
    summarise(min=min(n), max=max(n), mean=mean(n), median=median(n), p025=quantile(n, .025), p25=quantile(n, .25), p75=quantile(n,.75), p975=quantile(n, .975))
  
invisible("2021-12-17, se envió consulta a fiscalía")
  Base_fiscalia_v2 %>%
    dplyr::filter(ruc %in% as.character(unlist(base_fiscalia %>%
                                                   dplyr::filter(idsujeto_victima==0) %>%
                                                   dplyr::select(ruc)))) %>% 
    dplyr::arrange(ruc) %>% 
    dplyr::select(ruc,everything()) %>% 
    dplyr::slice(300:330) %>% 
    copiar_nombres()
}

id_suj_imp<-
cbind(cat="Number of entries by ID of accused",
Base_fiscalia_v2 %>%
    group_by(idsujeto_imputado) %>% 
    summarise(n=n()) %>% 
    summarise(min=min(n), max=max(n), mean=mean(n), median=median(n), p025=quantile(n, .025), p25=quantile(n, .25), p75=quantile(n,.75), p975=quantile(n, .975)))
#agrupa al resto, me da la impresión, tiene hasta 129 filas con el mismo id sujeto imputado

ruc<-
cbind(cat="Number of entries by RUC",
Base_fiscalia_v2 %>%
    group_by(ruc) %>% 
    summarise(n=n()) %>% 
    summarise(min=min(n), max=max(n), mean=mean(n), median=median(n), p025=quantile(n, .025), p25=quantile(n, .25), p75=quantile(n,.75), p975=quantile(n, .975)))

 # 1 0810024146-4   129
 # 2 0901135475-8   106
 # 3 1000499758-7    56
 # 4 1000241245-K    49

#El ruc no es específico, tiene hasta 129 filas. Ver si tienen relación con los ID's sjeto imputado o víctima

id_delito<-
cbind(cat="Number of entries by ID delito",
Base_fiscalia_v2 %>%
    group_by(iddelito) %>% 
    summarise(n=n()) %>% 
    summarise(min=min(n), max=max(n), mean=mean(n), median=median(n), p025=quantile(n, .025), p25=quantile(n, .25), p75=quantile(n,.75), p975=quantile(n, .975)))
# algo específica, tiene como máximo 82 filas con el mismo id delito

id_rel<-
cbind(cat="Number of entries by ID relación",
Base_fiscalia_v2 %>%
    group_by(idrelacion) %>% 
    summarise(n=n()) %>% 
    summarise(min=min(n), max=max(n), mean=mean(n, na.rm=T), median=median(n, na.rm=T), p025=quantile(n, .025), p25=quantile(n, .25), p75=quantile(n,.75), p975=quantile(n, .975)))
# más específica, tiene como máximo 2 filas con el mismo id relación

no_mostrar=1
if(no_mostrar==0){
invisible("Para ver casos posiblemente duplicados")
invisible("2021-12-17, enviado a fiscalía")
Base_fiscalia_v2 %>%
  dplyr::mutate(combinacion=paste0(ruc,"_",rut_enc_saf)) %>%
  dplyr::filter(combinacion %in% as.character(unlist(agrupacion_base %>% 
  dplyr::filter(max>1) %>%dplyr::mutate(combinacion=paste0(ruc,"_",rut_enc_saf)) %>% dplyr::select(combinacion)))) %>% View()
}

ruts<-cbind(cat="Number of entries by Ruts",
Base_fiscalia_v2 %>%
    group_by(rut_enc_saf) %>% 
    summarise(n=n()) %>% 
    summarise(min=min(n), max=max(n), mean=mean(n, na.rm=T), median=median(n, na.rm=T), p025=quantile(n, .025), p25=quantile(n, .25), p75=quantile(n,.75), p975=quantile(n, .975)))

ruc_por_rut<-
cbind(cat="Number of different Causes(RUCs) by RUT",
Base_fiscalia_v2 %>%
    group_by(rut_enc_saf) %>% 
    summarise(n=n_distinct(ruc)) %>% 
    summarise(min=min(n), max=max(n), mean=mean(n, na.rm=T), median=median(n, na.rm=T), p025=quantile(n, .025), p25=quantile(n, .25), p75=quantile(n,.75), p975=quantile(n, .975))) #%>% copiar_nombres()


del_por_ruc<-
cbind(cat="Number of different Crimes by RUT",
Base_fiscalia_v2 %>%
    group_by(rut_enc_saf) %>% 
    summarise(n=n_distinct(gls_materia)) %>% 
    summarise(min=min(n), max=max(n), mean=mean(n, na.rm=T), median=median(n, na.rm=T), p025=quantile(n, .025), p25=quantile(n, .25), p75=quantile(n,.75), p975=quantile(n, .975)))

rel_por_ruc<-
cbind(cat="Number of different relatonships by RUT",
Base_fiscalia_v2 %>%
    group_by(rut_enc_saf) %>% 
    summarise(n=n_distinct(idrelacion)) %>% 
    summarise(min=min(n), max=max(n), mean=mean(n, na.rm=T), median=median(n, na.rm=T), p025=quantile(n, .025), p25=quantile(n, .25), p75=quantile(n,.75), p975=quantile(n, .975)))# %>% copiar_nombres()

rel_por_ruc<-
cbind(cat="Number of different relatonships by Causes(RUC)",
Base_fiscalia_v2 %>%
    group_by(ruc) %>% 
    summarise(n=n_distinct(idrelacion)) %>% 
    summarise(min=min(n), max=max(n), mean=mean(n, na.rm=T), median=median(n, na.rm=T), p025=quantile(n, .025), p25=quantile(n, .25), p75=quantile(n,.75), p975=quantile(n, .975)))

delitos_ruc<-
cbind(cat="Number of different crimes by Causes(RUC)",base_fiscalia %>%
    group_by(ruc) %>% 
    summarise(n=n_distinct(gls_materia)) %>% 
    summarise(min=min(n), max=max(n), mean=mean(n, na.rm=T), median=median(n, na.rm=T), p025=quantile(n, .025), p25=quantile(n, .25), p75=quantile(n,.75), p975=quantile(n, .975)))


invisible("Exploremos algunos")
  # base_fiscalia %>%
  #   dplyr::filter(ruc %in% c("0810024146-4","0901135475-8")) %>% View()

invisible("ID sujeto imputado, RUC")
# base_fiscalia %>%
#     group_by(ruc,idsujeto_imputado) %>% 
#     summarise(n=n()) %>% 
#     summarise(min=min(n), max=max(n), mean=mean(n), median=median(n), p025=quantile(n, .025), p25=quantile(n, .25), p75=quantile(n,.75), p975=quantile(n, .975))
# No correr, entrega 494,929 casos

invisible("ID sujeto víctima, RUC")
# base_fiscalia %>%
#     group_by(idsujeto_victima,ruc) %>% 
#     summarise(n=n()) %>% 
#     summarise(min=min(n), max=max(n), mean=mean(n), median=median(n), p025=quantile(n, .025), p25=quantile(n, .25), p75=quantile(n,.75), p975=quantile(n, .975))
#no correr. son 514,344 casos
#si pongo al revés, con el RUC primero, 
      # Error: Problem with `summarise()` column `p75`.
      # i `p75 = quantile(n, 0.75)`.
      # x argument is not interpretable as logical
      # i The error occurred in group 40782: ruc = "1000495180-3".
      # Backtrace:
      #   1. `%>%`(...)
      #   9. base::.handleSimpleError(...)
      #  10. dplyr:::h(simpleError(msg, call))
      # In addition: Warning message:
      # In if (na.rm) x <- x[!is.na(x)] else if (anyNA(x)) stop("missing values and NaN's not allowed if 'na.rm' is FALSE") :
      #   the condition has length > 1 and only the first element will be used


bind_rows(ruts,
id_suj_vic, 
id_suj_imp,
ruc,
id_delito,
id_rel,
ruc_por_rut, 
del_por_ruc,
rel_por_ruc,
delitos_ruc) %>% 
  dplyr::select(cat, everything()) %>% 
  knitr::kable(size=11, first.strip=T, hide.no="no",
           format="html",caption= "Table 5. Counts of entries by different groups",
         smd=T, test=T, varLabels=T,noSpaces=T, printToggle=T, dropEqual=F) %>% #,col.names=c("Variables","Residential", "Ambulatory", "p-value")) %>% 
    kableExtra::kable_classic(bootstrap_options = c("striped", "hover","condensed"),font_size= 12) %>%
  # kableExtra::add_footnote(c("Note. Continuous variables are presented as Medians and Percentiles 25 and 75 were shown;", "Categorical variables are presented as number (%)"), notation = "none")%>%
  kableExtra::scroll_box(width = "100%", height = "375px")
Table 5. Counts of entries by different groups
cat min max mean median p025 p25 p75 p975
Number of entries by Ruts 1 260 7.594203 5 1 2 10 29
Number of entries by ID of victim 1 18045 1.115093 1 1 1 1 2
Number of entries by ID of accused 1 129 1.104897 1 1 1 1 2
Number of entries by RUC 1 129 1.148239 1 1 1 1 2
Number of entries by ID delito 1 82 1.075450 1 1 1 1 2
Number of entries by ID relación 1 2 1.000012 1 1 1 1 1
Number of different Causes(RUCs) by RUT 1 246 6.710008 5 1 2 9 25
Number of different Crimes by RUT 1 26 4.594323 4 1 2 6 13
Number of different relatonships by Causes(RUC) 1 129 1.148225 1 1 1 1 2
Number of different crimes by Causes(RUC) 1 7 1.055796 1 1 1 1 2


We looked for the percentage of entries with the ID for the victim equal to 0 (missing or does not apply) for each quarter, and the number of entries in which the crime is commited.


#sería RUT/Hash → RUC → relaciones
#
#fec_cbiorelacion
#fec_comision  
#termino_relacion 

invisible("¿Hay algún patrón por año?, ver el recuento de id_victimas==0 por cada trimestre y sacar un gráfico de densidad de eso")
require(zoo)
require(ggrepel)
## Loading required package: ggrepel
vic_trim_id_suj_0<-
Base_fiscalia_v2 %>% 
    dplyr::arrange(rut_enc_saf, ruc, idrelacion) %>% 
    dplyr::mutate(fech_ing_qrt=zoo::as.yearqtr(fec_comision)) %>%
    dplyr::mutate(idsujeto_victima_0=ifelse(idsujeto_victima==0,1,0)) %>% 
    dplyr::group_by(fech_ing_qrt) %>% #%>% janitor::tabyl(sus_ini)
    dplyr::summarise(n=n(),
                     sum_0 = length(n[idsujeto_victima_0==1]),
                     perc = sum_0/n) %>% 
    dplyr::ungroup() %>% 
    dplyr::mutate(label_text= paste0("Year/Quarter= ",fech_ing_qrt,"\nTotal Entries= ",n,"\n %= ",scales::percent(perc, accuracy=1L),"\nEntries w/ NNs= ", sum_0)) %>% 
    dplyr::filter(fech_ing_qrt>=2000) %>% 
    dplyr::arrange(desc(fech_ing_qrt)) %>% 
    ggplot2::ggplot(aes(x = fech_ing_qrt, y = perc, label = label_text)) +
    geom_line(color = "#0076A8", size=1) +
    #geom_text_repel(aes(x = fech_ing_qrt, y = perc, label = paste0("Rows=",n,"\nNN victims= ", sum_0)), vjust = -1,hjust = 0, angle=45, #size=3, arrow = arrow(length = unit(0.01, 'npc'))) +
    sjPlot::theme_sjplot2() +
    labs(y="% of Missing Data of the Victim",x="Years & Quarters, Date of commission of the crime",caption="Note. Some crimes were commited before 1960 (n= 246), and in 1900 (n=241)") + 
    scale_y_continuous(labels = scales::percent) +
    scale_x_yearqtr(format="%YQ%q", n=15) +
    theme(axis.text.x = element_text(vjust = 0.5,hjust = 0.5,angle = 60), plot.caption=element_text(hjust=0)) 

ggplotly(vic_trim_id_suj_0, tooltip="label_text")
vic_trim_id_suj_0_b<-
Base_fiscalia_v2 %>% 
  dplyr::arrange(rut_enc_saf, ruc, idrelacion) %>% 
  dplyr::mutate(fech_ing_qrt=zoo::as.yearqtr(termino_relacion)) %>%
   dplyr::mutate(idsujeto_victima_0=ifelse(idsujeto_victima==0,1,0)) %>% 
    dplyr::group_by(fech_ing_qrt) %>% #%>% janitor::tabyl(sus_ini)
   dplyr::summarise(n=n(),
                  sum_0 = length(n[idsujeto_victima_0==1]),
                  perc = sum_0/n) %>% 
  dplyr::ungroup() %>% 
    dplyr::mutate(label_text= paste0("Year/Quarter= ",fech_ing_qrt,"\nTotal Entries= ",n,"\n %= ",scales::percent(perc, accuracy=1L),"\nEntries w/ NNs= ", sum_0)) %>% 
  dplyr::filter(fech_ing_qrt>=2000) %>% 
  dplyr::arrange(desc(fech_ing_qrt)) %>% 
  ggplot2::ggplot(aes(x = fech_ing_qrt, y = perc, label = label_text)) +
  geom_line(color = "#0076A8", size=1) +
    # geom_text_repel(aes(x = fech_ing_qrt, y = perc, label = paste0("Rows=",n,"\nNN victims= ", sum_0)), vjust = -1,hjust = 0, angle=45, size=3, arrow = arrow(length = unit(0.01, 'npc'))) +
  sjPlot::theme_sjplot2() +
  labs(y="% of Missing Data of the Victim",x="Years & Quarters, Date of termination of the relationship") + 
  scale_y_continuous(labels = scales::percent) +
  scale_x_yearqtr(format="%YQ%q", n=30) +
  theme(axis.text.x = element_text(vjust = 0.5,hjust = 0.5,angle = 60), plot.caption=element_text(hjust=0)) 

ggplotly(vic_trim_id_suj_0_b, tooltip="label_text")


Some questions


# invisible("¿Puede que el RUC se repita para un mismo HASH?, ¿en qué situaciones?")
# base_fiscalia %>%
#   dplyr::mutate(combinacion=paste0(ruc,"_",rut_enc_saf)) %>%
#   dplyr::filter(combinacion %in% as.character(unlist(agrupacion_base %>% 
#   dplyr::filter(max>1) %>%dplyr::mutate(combinacion=paste0(ruc,"_",rut_enc_saf)) %>% dplyr::select(combinacion)))) %>% View()

cat("Entries with accused and victim status")
## Entries with accused and victim status
invisible("2021-12-17, enviado a fiscalía")

format(Base_fiscalia_v2 %>%
  dplyr::filter(encontrado_como_victima=="SI" & encontrado_como_imputado=="SI") %>% nrow(), big.mark=",")
## [1] "366"
cat("Differences between date of termination of cbiorelacion (fec_cbiorelacion) and termination of relationship (termino_relacion)")
## Differences between date of termination of cbiorelacion (fec_cbiorelacion) and termination of relationship (termino_relacion)
invisible("¿Hay diferencias en la fecha biorelacion y la de término de relación")
Base_fiscalia_v2 %>% 
    dplyr::filter(termino_relacion!=fec_cbiorelacion) %>% 
    dplyr::mutate(diff_en_dias=as.numeric((termino_relacion-fec_cbiorelacion)/(60*24))) %>% 
    select(diff_en_dias) %>% 
    summarise(n=n(),min=min(diff_en_dias), max=max(diff_en_dias), mean=mean(diff_en_dias), median=median(diff_en_dias), p025=quantile(diff_en_dias, .025), p25=quantile(diff_en_dias, .25), p75=quantile(diff_en_dias,.75), p975=quantile(diff_en_dias, .975)) %>% copiar_nombres()
## # A tibble: 1 x 9
##       n    min     max   mean median   p025    p25    p75   p975
##   <int>  <dbl>   <dbl>  <dbl>  <dbl>  <dbl>  <dbl>  <dbl>  <dbl>
## 1 44930 -0.990 -0.0139 -0.558 -0.542 -0.797 -0.681 -0.434 -0.345
cat("Entries in which the RUT is found as accused and victim (distinct RUTs & distinct RUCs)")
## Entries in which the RUT is found as accused and victim (distinct RUTs & distinct RUCs)
invisible("Casos en que hay filas en que un rut es imputado y víctima")
Base_fiscalia_v2 %>%
    dplyr::filter(encontrado_como_victima=="SI" & encontrado_como_imputado=="SI") %>% 
    summarise(n=n_distinct(rut_enc_saf), n2=n_distinct(ruc))
## # A tibble: 1 x 2
##       n    n2
##   <int> <int>
## 1   339   331
cat("Entries in which an accused commits a crime with distinct cause (RUC) in the same date")
## Entries in which an accused commits a crime with distinct cause (RUC) in the same date
invisible("Casos en que una persona comete un delito con distinta causa en la misma fecha")
format(Base_fiscalia_v2 %>%
    dplyr::mutate(comb=paste0(rut_enc_saf,"_",fec_comision)) %>% 
                    dplyr::add_count(comb, .keep=T) %>% filter(n > 1) %>% 
    dplyr::group_by(comb) %>% 
                      dplyr::mutate(n=n_distinct(ruc)) %>% 
    dplyr::filter(n>1) %>%
  nrow(), big.mark=",")
## [1] "31,437"
  # dplyr::ungroup() %>% 
  # dplyr::arrange(rut_enc_saf, ruc) %>% 
  # dplyr::select(rut_enc_saf, ruc, idrelacion, gls_materia, fec_comision)

# Ejemplo de un caso

# 0007678b8b35fa0961d1e8110fbf9620  SI  NO  6   VICTIMA 47350754    5   V Región de Valparaíso  16913947    1400066420-1    SALIDA NO JUDICIAL  DECISI¿N DE NO PERSEVERAR   525 AMENAZAS CONDIC. CONTRA PERSONAS Y PROP. ART. 296 1 y 2, 297    DELITOS CONTRA LA LIBERTAD E INTIMIDAD DE LAS PERSONAS  SI  16  CONVIVIENTE 5   Decisión de no perseverar en el proced  0   NA  1   ORDINARIO   47350753    3   IMPUTADO    12909542    18-01-2014 19:40    16-04-2014  2   LUGAR HABITADO O DESTINADO A LA HABITACION Y SUS DEPENDENCIAS   1   VIVIENDA    310 VALPARAISO  5   V Región de Valparaíso  16-04-2014  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA

# 0007678b8b35fa0961d1e8110fbf9620  SI  NO  6   VICTIMA 47359056    5   V Región de Valparaíso  16916932    1400068650-7    SALIDA NO JUDICIAL  ARCHIVO PROVISIONAL 524 AMENAZAS SIMPLES CONTRA PERSONAS Y PROPIEDADES ART. 296 Nº3.    DELITOS CONTRA LA LIBERTAD E INTIMIDAD DE LAS PERSONAS  SI  16  CONVIVIENTE 1   Archivo Provisional 0   NA  0   SIN PROCEDIMIENTO   47359057    3   IMPUTADO    12911972    18-01-2014 19:40    27-01-2014  2   LUGAR HABITADO O DESTINADO A LA HABITACION Y SUS DEPENDENCIAS   1   VIVIENDA    310 VALPARAISO  5   V Región de Valparaíso  27-01-2014  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA  NA

cat("Entries that have different relationship ID for the same combination of an ID of the victim and the ID of the accused")
## Entries that have different relationship ID for the same combination of an ID of the victim and the ID of the accused
invisible("Gente que tendría distinto id de relación para una misma combianción de id víctima e id imputado")
format(Base_fiscalia_v2 %>%
    dplyr::mutate(comb=paste0(idsujeto_victima,"_",idsujeto_imputado)) %>% 
    dplyr::add_count(comb, .keep=T) %>% filter(n > 1) %>% 
    dplyr::group_by(comb) %>% 
    dplyr::summarise(n=n_distinct(idrelacion)) %>% 
    dplyr::filter(!grepl("^0_", comb)) %>% 
    dplyr::filter(n>1) %>%  nrow(), big.mark=",")
## [1] "21,393"
cat("Example")
## Example
Base_fiscalia_v2 %>%
    dplyr::mutate(comb=paste0(idsujeto_victima,"_",idsujeto_imputado)) %>% 
    arrange(rut_enc_saf,fec_comision,ruc,idrelacion) %>% 
    dplyr::filter(comb=="10760610_10760611") %>%
    dplyr::select(rut_enc_saf, ruc, idsujeto_victima, idsujeto_imputado, idrelacion, gls_materia) %>%  print()
## # A tibble: 2 x 6
##   rut_enc_saf     ruc   idsujeto_victima idsujeto_imputa~ idrelacion gls_materia
##   <chr>           <chr>            <dbl>            <dbl>      <dbl> <chr>      
## 1 daee9f4184b1c0~ 0700~         10760610         10760611    4201225 VIOLACIÓN ~
## 2 daee9f4184b1c0~ 0700~         10760610         10760611    4040665 LESIONES L~
cat("Cases with date of crime comission are posterior to the date that the relationship ended")
## Cases with date of crime comission are posterior to the date that the relationship ended
format(Base_fiscalia_v2 %>%
  dplyr::mutate(fec_comision_simple=as.Date(stringr::str_extract(as.character(fec_comision), "^.{10}"))) %>% 
  dplyr::mutate(termino_relacion_simple=as.Date(stringr::str_extract(as.character(termino_relacion), "^.{10}"))) %>%
  dplyr::mutate(diff_en_dias=as.numeric((termino_relacion_simple-fec_comision_simple))) %>% 
  dplyr::filter(diff_en_dias<0) %>% 
  nrow(), big.mark=",")
## [1] "68"
   #dplyr::select(rut_enc_saf,ruc, fec_comision, termino_relacion, diff_en_dias) %>%  
  #     select(diff_en_dias) %>% 
  #     summarise(n=n(),min=min(diff_en_dias), max=max(diff_en_dias), mean=mean(diff_en_dias), median=median(diff_en_dias), p025=quantile(diff_en_dias, .025), p25=quantile(diff_en_dias, .25), p75=quantile(diff_en_dias,.75), p975=quantile(diff_en_dias, .975)) %>% copiar_nombres()

cat("Are gls_materia and cod_delito distinct (differences in the number of categories contained)?")
## Are gls_materia and cod_delito distinct (differences in the number of categories contained)?
ifelse(Base_fiscalia_v2 %>%
    dplyr::group_by(cod_delito) %>% 
    summarise(n=n_distinct(gls_materia)) %>% 
    dplyr::filter(n>1) %>% nrow()>0,"Yes","No")
## [1] "No"
cat("And viceversa?")
## And viceversa?
ifelse(Base_fiscalia_v2 %>%
    dplyr::group_by(gls_materia) %>% 
    summarise(n=n_distinct(cod_delito)) %>% 
    dplyr::filter(n>1) %>% nrow(), "Yes","No")
## [1] "No"
cat("Cases in which the same RUC has 2 or more RUTs")
## Cases in which the same RUC has 2 or more RUTs
format(Base_fiscalia_v2 %>%
    dplyr::group_by(ruc) %>% 
    summarise(n=n_distinct(rut_enc_saf)) %>% 
    dplyr::filter(n>1) %>% 
  nrow(), big.mark=",")
## [1] "6,693"
#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_
#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_
#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_


cat("Number of different relationships within a RUC by each RUT")
## Number of different relationships within a RUC by each RUT
invisible("ID's de relación por RUCs en RUTs")
agrupacion_base<-
Base_fiscalia_v2 %>%
    group_by(ruc,rut_enc_saf,idrelacion) %>% 
    summarise(n=n()) %>% 
    summarise(min=min(n), max=max(n), mean=mean(n, na.rm=T), median=median(n, na.rm=T), p025=quantile(n, .025), p25=quantile(n, .25), p75=quantile(n,.75), p975=quantile(n, .975))
## `summarise()` has grouped output by 'ruc', 'rut_enc_saf'. You can override
## using the `.groups` argument.
## `summarise()` has grouped output by 'ruc'. You can override using the `.groups`
## argument.
rel_ruc_rut<-
cbind("More than one relationship within a RUC by each RUT",
agrupacion_base %>% 
    dplyr::filter(max>1) %>% nrow())
invisible("Casos en que agrupados las relaciones por rucs y a su vez por cada rut, resultan tener 2 relaciones")
invisible("ruc=='1101216380-2' tiene todo igual con la otra fila")
invisible("ruc=='1200110540-8' tiene todo igual con la otra fila")
invisible("ruc=='1200685456-5' tiene todo igual con la otra fila")
invisible("ruc=='1200685456-5' tiene todo igual con la otra fila")
# ruc          rut_enc_saf                        min   max  mean median  p025   p25   p75  p975
# 1 1101216380-2 6a72664c6071e9728753279c9e9719e5     2     2   2      2    2     2     2     2   
# 2 1200110540-8 471b17aece44998caa6f83fee6b3b483     2     2   2      2    2     2     2     2   
# 3 1200685456-5 f1966360761b422b7e826bab2e1a38dc     2     2   2      2    2     2     2     2   
# 4 1200771867-3 a2aee30c6c0693a9c13f39e3520f666c     2     2   2      2    2     2     2     2   
# 5 1201254538-8 2d3bec94a94304a0b786ab83f7d1021a     2     2   2      2    2     2     2     2   
# 6 1300390161-5 f336b9f3e4097cfe736239a8bb937596     1     2   1.5    1.5  1.02  1.25  1.75  1.98
# 7 1600027649-2 bfc39f93fe4e0958c4e0ec16dddec275     2     2   2      2    2     2     2     2   

del_por_rel_ruc<-
  cbind(cat="Delitos por relación y RUC",
Base_fiscalia_v2 %>%
    group_by(ruc, idrelacion, gls_materia) %>% 
    summarise(n=n()) %>% 
    summarise(min=min(n), max=max(n), mean=mean(n, na.rm=T), median=median(n, na.rm=T), p025=quantile(n, .025), p25=quantile(n, .25), p75=quantile(n,.75), p975=quantile(n, .975)))
## `summarise()` has grouped output by 'ruc', 'idrelacion'. You can override using
## the `.groups` argument.
## `summarise()` has grouped output by 'ruc'. You can override using the `.groups`
## argument.


Entries with the same data


options(knitr.kable.NA = '')

#quienes tienen más de uno, son los mismos datos
Base_fiscalia_v2 %>%
dplyr::filter(idrelacion %in% c(12935546, 13290172, 14124442, 14248963, 14953586, 15559264, 20446792)) %>% 
  dplyr::arrange(rut_enc_saf, ruc, idrelacion, id_delito) %>% 
knitr::kable(size=11, first.strip=T, hide.no="no",
           format="html",caption= "Table 6. Cases with duplicated entries",
         smd=T, test=T, varLabels=T,noSpaces=T, printToggle=T, dropEqual=F) %>% #,col.names=c("Variables","Residential", "Ambulatory", "p-value")) %>% 
    kableExtra::kable_classic(bootstrap_options = c("striped", "hover","condensed"),font_size= 10) %>%
  # kableExtra::add_footnote(c("Note. Continuous variables are presented as Medians and Percentiles 25 and 75 were shown;", "Categorical variables are presented as number (%)"), notation = "none")%>%
  kableExtra::scroll_box(width = "100%", height = "375px")
Table 6. Cases with duplicated entries
rut_enc_saf fec_nacimiento pais sexo encontrado_como_victima encontrado_como_imputado tipo_sujeto_vic gls_tipo_sujeto_vic idsujeto_victima reg gls_region idrelacion ruc tipo_termino agrupa_terminos cod_delito gls_materia familia_delito relacion_vifsaf cod_parentescoimputado gls_parentesco cod_mottermino gls_mottermino cod_motsuspension gls_motsuspension cod_proctermino gls_proctermino idsujeto_imputado impcod_tiposujeto gls_tipo_imputado iddelito fec_comision termino_relacion cod_lugarocurrencia lugar_ocurrencia cod_sitiosuceso gls_sitiosuceso cod_comunadelito gls_comuna cod_region region_delito fec_cbiorelacion medidas_155 medidas_pp medidas_ip marca_suspension_43 marca_pena_44 marca_multa_45 medida_alternativa_46 clasificacion_pena_47 tramos_condena_48 clasificacion_penarpa_1_49 clasificacion_penarpa_2_50 marca_suspension_51 marca_pena_52 marca_multa_53 medida_alternativa_54 clasificacion_pena_55 tramos_condena_56 clasificacion_penarpa_1_57 clasificacion_penarpa_2_58 fec_comision_simple fec_cbiorelacion_simple fec_nacimiento_simple termino_relacion_simple edad_comision edad_ter_rel
2d3bec94a94304a0b786ab83f7d1021a 1990-03-06 00:00:00 CHILE MASCULINO SI NO 6 VICTIMA 41593078 5 V Región de Valparaíso 14953586 1201254538-8 SALIDA JUDICIAL SENTENCIA DEFINITIVA CONDENATORIA 812 RECEPTACIÓN. ART. 456 BIS A OTROS DELITOS CONTRA LA PROPIEDAD NO 25 Sentencia definitiva condenatoria 0 3 ABREVIADO 41549070 3 IMPUTADO 11387704 2012-12-18 14:50:00 2013-04-16 1 BIENES NACIONALES USO PUBLICO 1 VIA PUBLICA URBANA 310 VALPARAISO 5 V Región de Valparaíso 2013-04-16 SI NO SI SI Presidio Menor grado mínimo 2012-12-18 2013-04-16 1990-03-06 2013-04-16 22.78713 23.11294
2d3bec94a94304a0b786ab83f7d1021a 1990-03-06 00:00:00 CHILE MASCULINO SI NO 6 VICTIMA 41593078 5 V Región de Valparaíso 14953586 1201254538-8 SALIDA JUDICIAL SENTENCIA DEFINITIVA CONDENATORIA 812 RECEPTACIÓN. ART. 456 BIS A OTROS DELITOS CONTRA LA PROPIEDAD NO 25 Sentencia definitiva condenatoria 0 3 ABREVIADO 41549070 3 IMPUTADO 11387704 2012-12-18 14:50:00 2013-04-16 1 BIENES NACIONALES USO PUBLICO 1 VIA PUBLICA URBANA 310 VALPARAISO 5 V Región de Valparaíso 2013-04-16 SI NO SI SI Presidio Menor grado mínimo 2012-12-18 2013-04-16 1990-03-06 2013-04-16 22.78713 23.11294
471b17aece44998caa6f83fee6b3b483 1975-01-20 00:00:00 CHILE MASCULINO NO SI 6 VICTIMA 36800899 8 VIII Región del Bio Bio 13290172 1200110540-8 SALIDA NO JUDICIAL INCOMPETENCIA 1099 OTROS HECHOS HECHOS DE RELEVANCIA CRIMINAL NO 18 Incomp tratarse materias conoc otro trib 0 0 SIN PROCEDIMIENTO 36801001 3 IMPUTADO 10116153 2012-01-30 10:09:00 2012-02-06 2 LUGAR HABITADO O DESTINADO A LA HABITACION Y SUS DEPENDENCIAS 1 VIVIENDA 456 TALCAHUANO 8 VIII Región del Bio Bio 2012-02-06 2012-01-30 2012-02-06 1975-01-20 2012-02-06 37.02669 37.04586
471b17aece44998caa6f83fee6b3b483 1975-01-20 00:00:00 CHILE MASCULINO NO SI 6 VICTIMA 36800899 8 VIII Región del Bio Bio 13290172 1200110540-8 SALIDA NO JUDICIAL INCOMPETENCIA 1099 OTROS HECHOS HECHOS DE RELEVANCIA CRIMINAL NO 18 Incomp tratarse materias conoc otro trib 0 0 SIN PROCEDIMIENTO 36801001 3 IMPUTADO 10116153 2012-01-30 10:09:00 2012-02-06 2 LUGAR HABITADO O DESTINADO A LA HABITACION Y SUS DEPENDENCIAS 1 VIVIENDA 456 TALCAHUANO 8 VIII Región del Bio Bio 2012-02-06 2012-01-30 2012-02-06 1975-01-20 2012-02-06 37.02669 37.04586
6a72664c6071e9728753279c9e9719e5 1992-06-05 00:00:00 CHILE FEMENINO NO SI 6 VICTIMA 35794461 3 III Región de Atacama 12935546 1101216380-2 SALIDA JUDICIAL FACULTAD PARA NO INVESTIGAR 1099 OTROS HECHOS HECHOS DE RELEVANCIA CRIMINAL NO 2 No Inicio Investigación 0 0 SIN PROCEDIMIENTO 35794830 3 IMPUTADO 9848587 2011-11-24 10:10:00 2011-12-26 3 ESTABLECIMIENTO COMERCIAL 5 TIENDA COMERCIAL 245 VALLENAR 3 III Región de Atacama 2011-12-26 2011-11-24 2011-12-26 1992-06-05 2011-12-26 19.46886 19.55647
6a72664c6071e9728753279c9e9719e5 1992-06-05 00:00:00 CHILE FEMENINO NO SI 6 VICTIMA 35794461 3 III Región de Atacama 12935546 1101216380-2 SALIDA JUDICIAL FACULTAD PARA NO INVESTIGAR 1099 OTROS HECHOS HECHOS DE RELEVANCIA CRIMINAL NO 2 No Inicio Investigación 0 0 SIN PROCEDIMIENTO 35794830 3 IMPUTADO 9848587 2011-11-24 10:10:00 2011-12-26 3 ESTABLECIMIENTO COMERCIAL 5 TIENDA COMERCIAL 245 VALLENAR 3 III Región de Atacama 2011-12-26 2011-11-24 2011-12-26 1992-06-05 2011-12-26 19.46886 19.55647
a2aee30c6c0693a9c13f39e3520f666c 1984-06-20 00:00:00 CHILE MASCULINO NO SI 6 VICTIMA 39546660 15 RM Oriente 14248963 1200771867-3 SALIDA JUDICIAL SENTENCIA DEFINITIVA ABSOLUTORIA 525 AMENAZAS CONDIC. CONTRA PERSONAS Y PROP. ART. 296 1 y 2, 297 DELITOS CONTRA LA LIBERTAD E INTIMIDAD DE LAS PERSONAS SI 22 PADRE HIJO COMUN 24 Sentencia definitiva absolutoria 0 2 SIMPLIFICADO 39546761 3 IMPUTADO 10847174 2012-08-03 12:50:00 2013-09-11 2 LUGAR HABITADO O DESTINADO A LA HABITACION Y SUS DEPENDENCIAS 1 VIVIENDA 758 LA FLORIDA 15 RM Oriente 2013-09-11 2012-08-03 2013-09-11 1984-06-20 2013-09-11 28.12047 29.22656
a2aee30c6c0693a9c13f39e3520f666c 1984-06-20 00:00:00 CHILE MASCULINO NO SI 6 VICTIMA 39546660 15 RM Oriente 14248963 1200771867-3 SALIDA JUDICIAL SENTENCIA DEFINITIVA ABSOLUTORIA 525 AMENAZAS CONDIC. CONTRA PERSONAS Y PROP. ART. 296 1 y 2, 297 DELITOS CONTRA LA LIBERTAD E INTIMIDAD DE LAS PERSONAS SI 22 PADRE HIJO COMUN 24 Sentencia definitiva absolutoria 0 2 SIMPLIFICADO 39546761 3 IMPUTADO 10847174 2012-08-03 12:50:00 2013-09-11 2 LUGAR HABITADO O DESTINADO A LA HABITACION Y SUS DEPENDENCIAS 1 VIVIENDA 758 LA FLORIDA 15 RM Oriente 2013-09-11 2012-08-03 2013-09-11 1984-06-20 2013-09-11 28.12047 29.22656
bfc39f93fe4e0958c4e0ec16dddec275 1959-12-17 00:00:00 CHILE MASCULINO NO SI 6 VICTIMA 57866854 3 III Región de Atacama 20446792 1600027649-2 SALIDA JUDICIAL SOBRESEIMIENTO DEFINITIVO 240 311 FALSIF LICENCIAS MEDICAS O PENSIONES. ART.202 INC.2° Y 3° DELITOS CONTRA LA FE PÚBLICA NO 9 S Definit (vencim plazo suspens art 240) 2 SUSPENSION CONDICIONAL DEL PROCEDIMIENTO 1 ORDINARIO 57866860 3 IMPUTADO 15680493 2016-01-08 18:14:00 2017-07-06 3 ESTABLECIMIENTO COMERCIAL 8 ESTABLECIMIENTOS DE ALIMENTACION 235 CHAÑARAL 3 III Región de Atacama 2017-07-06 2016-01-08 2017-07-06 1959-12-17 2017-07-06 56.06023 57.55236
bfc39f93fe4e0958c4e0ec16dddec275 1959-12-17 00:00:00 CHILE MASCULINO NO SI 6 VICTIMA 57866854 3 III Región de Atacama 20446792 1600027649-2 SALIDA JUDICIAL SOBRESEIMIENTO DEFINITIVO 240 311 FALSIF LICENCIAS MEDICAS O PENSIONES. ART.202 INC.2° Y 3° DELITOS CONTRA LA FE PÚBLICA NO 9 S Definit (vencim plazo suspens art 240) 2 SUSPENSION CONDICIONAL DEL PROCEDIMIENTO 1 ORDINARIO 57866860 3 IMPUTADO 15680493 2016-01-08 18:14:00 2017-07-06 3 ESTABLECIMIENTO COMERCIAL 8 ESTABLECIMIENTOS DE ALIMENTACION 235 CHAÑARAL 3 III Región de Atacama 2017-07-06 2016-01-08 2017-07-06 1959-12-17 2017-07-06 56.06023 57.55236
f1966360761b422b7e826bab2e1a38dc 1980-01-19 00:00:00 CHILE MASCULINO SI NO 6 VICTIMA 39189042 7 VII Región del Maule 14124442 1200685456-5 SALIDA NO JUDICIAL ARCHIVO PROVISIONAL 856 APROPIACION INDEBIDA ART.470 N°1 DELITOS ECONÓMICOS Y TRIBUTARIOS NO 1 Archivo Provisional 0 0 SIN PROCEDIMIENTO 39189110 3 IMPUTADO 10751252 2012-07-09 16:12:00 2014-06-09 0 0 390 TALCA 7 VII Región del Maule 2014-06-09 2012-07-09 2014-06-09 1980-01-19 2014-06-09 32.47091 34.38741
f1966360761b422b7e826bab2e1a38dc 1980-01-19 00:00:00 CHILE MASCULINO SI NO 6 VICTIMA 39189042 7 VII Región del Maule 14124442 1200685456-5 SALIDA NO JUDICIAL ARCHIVO PROVISIONAL 856 APROPIACION INDEBIDA ART.470 N°1 DELITOS ECONÓMICOS Y TRIBUTARIOS NO 1 Archivo Provisional 0 0 SIN PROCEDIMIENTO 39189110 3 IMPUTADO 10751252 2012-07-09 16:12:00 2014-06-09 0 0 390 TALCA 7 VII Región del Maule 2014-06-09 2012-07-09 2014-06-09 1980-01-19 2014-06-09 32.47091 34.38741
f336b9f3e4097cfe736239a8bb937596 1984-06-09 00:00:00 CHILE MASCULINO NO SI 6 VICTIMA 43358250 7 VII Región del Maule 15559264 1300390161-5 SALIDA JUDICIAL FACULTAD PARA NO INVESTIGAR 524 AMENAZAS SIMPLES CONTRA PERSONAS Y PROPIEDADES ART. 296 Nº3. DELITOS CONTRA LA LIBERTAD E INTIMIDAD DE LAS PERSONAS SI 21 EX CONVIVIENTE 2 No Inicio Investigación 0 0 SIN PROCEDIMIENTO 43358179 3 IMPUTADO 11856719 2013-04-18 12:23:00 2013-04-19 2 LUGAR HABITADO O DESTINADO A LA HABITACION Y SUS DEPENDENCIAS 1 VIVIENDA 390 TALCA 7 VII Región del Maule 2013-04-19 2013-04-18 2013-04-19 1984-06-09 2013-04-19 28.85695 28.85969
f336b9f3e4097cfe736239a8bb937596 1984-06-09 00:00:00 CHILE MASCULINO NO SI 6 VICTIMA 43358250 7 VII Región del Maule 15559264 1300390161-5 SALIDA JUDICIAL FACULTAD PARA NO INVESTIGAR 524 AMENAZAS SIMPLES CONTRA PERSONAS Y PROPIEDADES ART. 296 Nº3. DELITOS CONTRA LA LIBERTAD E INTIMIDAD DE LAS PERSONAS SI 21 EX CONVIVIENTE 2 No Inicio Investigación 0 0 SIN PROCEDIMIENTO 43358179 3 IMPUTADO 11856719 2013-04-18 12:23:00 2013-04-19 2 LUGAR HABITADO O DESTINADO A LA HABITACION Y SUS DEPENDENCIAS 1 VIVIENDA 390 TALCA 7 VII Región del Maule 2013-04-19 2013-04-18 2013-04-19 1984-06-09 2013-04-19 28.85695 28.85969


Merge with SENDAs database

invisible("¿Hay RUTs de fiscalía que no existen en la base de datos SENDA?")
invisible("Ver cuántos calzan con la Base anterior (datos descartados en etapas del proceso de limpieza de datos)")
rbind(
cbind(cat="RUTs in P.O. that are not in SENDA's most recent database (accused)",
#Sólo el recuento de los RUTs
base_fiscalia_acc_imp %>% 
    #sólo dejo RUT únicos en la de septiembre, cosa que no me aumenten las filas originales
  dplyr::left_join(distinct(CONS_C1_df_dup_SEP_2020[,c("hash_key","dup")],hash_key, .keep_all = T),by=c("rut_enc_saf"="hash_key")) %>% 
  dplyr::distinct(rut_enc_saf, .keep_all = T) %>% 
      dplyr::summarise(n=n(),
                     sum_na = length(n[is.na(dup)]),
                     perc = scales::percent(sum_na/n, accuracy=.01))),
cbind(cat="RUTs in P.O. that are not in SENDA's most recent database (victims)",
base_fiscalia_acc_vic %>% 
    #sólo dejo RUT únicos en la de septiembre, cosa que no me aumenten las filas originales
  dplyr::left_join(distinct(CONS_C1_df_dup_SEP_2020[,c("hash_key","dup")],hash_key, .keep_all = T),by=c("rut_enc_saf"="hash_key")) %>% 
  dplyr::distinct(rut_enc_saf, .keep_all = T) %>% 
      dplyr::summarise(n=n(),
                     sum_na = length(n[is.na(dup)]),
                     perc = scales::percent(sum_na/n, accuracy=.01))),

cbind(cat="RUTs that matches with the original SENDA's database (accused)",
#Sólo el recuento de los RUTs
base_fiscalia_acc_imp %>% 
    #sólo dejo RUT únicos en la de septiembre, cosa que no me aumenten las filas originales
  dplyr::left_join(distinct(CONS_C1[,c("HASH_KEY","row")],HASH_KEY, .keep_all = T),by=c("rut_enc_saf"="HASH_KEY")) %>% 
  dplyr::distinct(rut_enc_saf, .keep_all = T) %>% 
      dplyr::summarise(n=n(),
                     sum_na = length(n[is.na(row)]),
                     perc = scales::percent(sum_na/n, accuracy=.01))),

cbind(cat="RUTs that matches with the original SENDA's database (victims)",
base_fiscalia_acc_vic %>% 
    #sólo dejo RUT únicos en la de septiembre, cosa que no me aumenten las filas originales
  dplyr::left_join(distinct(CONS_C1[,c("HASH_KEY","row")],HASH_KEY, .keep_all = T),by=c("rut_enc_saf"="HASH_KEY")) %>% 
  dplyr::distinct(rut_enc_saf, .keep_all = T) %>% 
      dplyr::summarise(n=n(),
                     sum_na = length(n[is.na(row)]),
                     perc = scales::percent(sum_na/n, accuracy=.01)))
) %>% 
knitr::kable(size=11, first.strip=T, hide.no="no",
           format="html",caption= "Table 7. Comparison of availability of RUTs") %>% #,col.names=c("Variables","Residential", "Ambulatory", "p-value")) %>% 
    kableExtra::kable_classic(bootstrap_options = c("striped", "hover","condensed"),font_size= 12)
Table 7. Comparison of availability of RUTs
cat n sum_na perc
RUTs in P.O. that are not in SENDA’s most recent database (accused) 63537 369 0.58%
RUTs in P.O. that are not in SENDA’s most recent database (victims) 57320 398 0.69%
RUTs that matches with the original SENDA’s database (accused) 63537 0 0.00%
RUTs that matches with the original SENDA’s database (victims) 57320 0 0.00%


Preliminary Analyses for SER 2022

if(no_mostrar==0){
load("E:/Mi unidad/Alvacast/SISTRAT 2019 (github)/10.RData")
load("C:/Users/CISS Fondecyt/Mi unidad/Alvacast/SISTRAT 2019 (github)/10.RData")

if(!require(tidyr)){install.packages("tidyr")}
if(!require(DataExplorer)){install.packages("DataExplorer")}
if(!require(stringi)){install.packages("stringi")}
if(!require(stringr)){install.packages("stringr")}
if(!require(ggplot2)){install.packages("ggplot2")}
if(!require(Hmisc)){install.packages("Hmisc")}
if(!require(kableExtra)){install.packages("kableExtra")}
if(!require(plotly)){install.packages("plotly")}
if(!require(rbokeh)){install.packages("rbokeh")}
if(!require(altair)){install.packages("altair")}
if(!require(zoo)){install.packages("zoo")}
if(!require(codebook)){install.packages("codebook")}
if(!require(broom)){install.packages("broom")}
if(!require(sqldf)){install.packages("sqldf")} 
if(!require(devtools)){install.packages("devtools")}
if(!require(Statamarkdown)){install_github("hemken/Statamarkdown")}
if(!require(data.table)){install.packages("data.table")}
if(!require(boot)){install.packages("boot")}
if(!require(plyr)){install.packages("plyr")}
  if(!require(dplyr)){install.packages("dplyr")}
if(!require(matrixStats)){install.packages("matrixStats")}
  if(!require(janitor)){install.packages("janitor")}
if(!require(explore)){devtools::install_github("rolkra/explore",upgrade ="never")}
}
#We described the cumulative incidence rate of readmission and its variation by treatment outcome (i.e., early and late withdrawal from treatment vs. therapeutic discharge) and main substance of abuse at admission. Early withdraw was defined as withdraw within the first 90 days of treatment.

#There were 111,526 admissions from 81,923 people during 2010 and 2019. Seventy five percent were male and the average age at admission was 35. The main substance at admission was cocaine paste base (43.6%), followed by alcohol (30.5%), snort cocaine (18.3%), and marihuana (5.8%%). Among those with discharge information (N=103,723), the 22.6% had a therapeutic discharge, 34.1% had early withdraw, 16.9% had late withdraw, and 9.1% were expelled. The incidence rate of treatment readmission was 197 per 1,000 patients-year and the average time outside treatment (among readmitted patients) was 2.3 years. Compared with those with therapeutic discharge, the incidence rate ratio (IRR) for people with early and late withdraw was 2.85 (95%CI: 2.69, 3.01) and 1.72 (95%CI: 1.64, 1.80), respectively. Compared with those using alcohol as main substance at admission, the IRR for snort cocaine was 1.28 (IC95%: 1.22, 1.34) and for cocaine paste base was 1.53 (95%CI: 1.47, 1.58); no difference was observed for those using marijuana (IRR=1.03; 95%CI: 0.96, 1.10).

#Conclusions. Readmissions to SUD treatment were high, particularly among early withdrawers and those using cocaine paste at admission. Individual risk assessment at admission seems to be a crucial component of treatment to prevent early withdrawal and subsequent problems, such treatment readmission.
invisible("Una de las limitaciones del estudio preliminar es que tiene todos los RUT, incluso los 370 y algo que no calzan con la base de datos actual, y algunas entradas que debieron ser anuladas por error de digitación. Lo anterior, para tener en cuenta")

paste0("Drug treatment patients: ", length(unique(CONS_C1_df_dup_SEP_2020$hash_key)))
## [1] "Drug treatment patients: 85048"
paste0("Treatment episodes: ",length(CONS_C1_df_dup_SEP_2020$hash_key))
## [1] "Treatment episodes: 109756"
paste0("Drug treatment patients: ", length(unique(CONS_C1_df_dup_SEP_2020$hash_key)))
## [1] "Drug treatment patients: 85048"
print("percentages")
## [1] "percentages"
round(prop.table(table(ifelse(grepl("PR",CONS_C1_df_dup_SEP_2020$tipo_de_plan_2),"Residential","Ambulatory"))),3)*100
## 
##  Ambulatory Residential 
##        82.1        17.9
paste0("Mean length per treatment: ", round(mean(CONS_C1_df_dup_SEP_2020$dias_treat_imp_sin_na),1), " days")
## [1] "Mean length per treatment: 215.3 days"
round(prop.table(table(ifelse(grepl("Therapeutic",CONS_C1_df_dup_SEP_2020$motivodeegreso_mod_imp),"Therapeutic","Else"))),3)*100
## 
##        Else Therapeutic 
##        77.8        22.2
paste0("Entries of imputed relationships (crime, accused, victim and RUC): ",
       Base_fiscalia_v2 %>% 
         dplyr::filter(gls_mottermino!="Anulación de ingreso error de digitación"|is.na(gls_mottermino)) %>% 
         dplyr::filter(rut_enc_saf %in% unique(CONS_C1_df_dup_SEP_2020$hash_key)) %>% 
  dplyr::mutate(accused=dplyr::case_when(encontrado_como_victima=="SI" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                 encontrado_como_victima=="NO" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                 T~"VICTIMA")) %>% 
      dplyr::filter(accused=="IMPUTADO") %>% nrow() %>%  format(big.mark=","))
## [1] "Entries of imputed relationships (crime, accused, victim and RUC): 374,228"
paste0("Criminal processes (RUCs) that had an imputed in which a SENDAs patient participated as an accused: ",
       Base_fiscalia_v2 %>% 
         dplyr::filter(gls_mottermino!="Anulación de ingreso error de digitación"|is.na(gls_mottermino)) %>% 
         dplyr::filter(rut_enc_saf %in% unique(CONS_C1_df_dup_SEP_2020$hash_key)) %>% 
         dplyr::mutate(accused=dplyr::case_when(encontrado_como_victima=="SI" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                                  encontrado_como_victima=="NO" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                                  T~"VICTIMA")) %>% 
         dplyr::filter(accused=="IMPUTADO") %>%
         #slice(1:500) %>% 
         dplyr::distinct(ruc) %>% 
         nrow() %>% format(big.mark=","))
## [1] "Criminal processes (RUCs) that had an imputed in which a SENDAs patient participated as an accused: 324,858"
#324,858 casos distintos

invisible("son como 326299/63537=5.15 por rut")

paste0("Percentage of patients involved in criminal process (RUCs) as accused: ",
       scales::percent(
         Base_fiscalia_v2 %>% 
          dplyr::filter(gls_mottermino!="Anulación de ingreso error de digitación"|is.na(gls_mottermino)) %>% 
          dplyr::filter(rut_enc_saf %in% unique(CONS_C1_df_dup_SEP_2020$hash_key)) %>% 
          dplyr::mutate(accused=dplyr::case_when(encontrado_como_victima=="SI" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                                  encontrado_como_victima=="NO" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                                  T~"VICTIMA")) %>% 
         dplyr::filter(accused=="IMPUTADO") %>% 
         dplyr::distinct(rut_enc_saf) %>% nrow()/length(unique(CONS_C1_df_dup_SEP_2020$hash_key))
       )
)
## [1] "Percentage of patients involved in criminal process (RUCs) as accused: 74%"
#63158 envueltos

cat("Grouped distinct combinations of  RUTs, RUCs (criminal processes) & type of crime (gls_materia) that they were charged")
## Grouped distinct combinations of  RUTs, RUCs (criminal processes) & type of crime (gls_materia) that they were charged
paste0("[CALCULATED WRONGLY]Percentage of patients involved in criminal processes (RUCs) as accused that were charged for violent crimes: ",
         Base_fiscalia_v2 %>% 
         dplyr::filter(gls_mottermino!="Anulación de ingreso error de digitación"|is.na(gls_mottermino)) %>% 
        dplyr::filter(rut_enc_saf %in% unique(CONS_C1_df_dup_SEP_2020$hash_key)) %>% 
         dplyr::mutate(accused=dplyr::case_when(encontrado_como_victima=="SI" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                                  encontrado_como_victima=="NO" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                                  T~"VICTIMA")) %>% 
         dplyr::filter(accused=="IMPUTADO") %>% 
        # dplyr::slice(1:1000) %>% 
         dplyr::distinct(rut_enc_saf, ruc, gls_materia, .keep_all = T) %>% 
         dplyr::mutate(familia_delito_rec=dplyr::case_when(grepl("LESA HUMANIDAD",familia_delito)~"VIOLENT CRIME",
                                                           grepl("SEXUALES",familia_delito)~"VIOLENT CRIME",
                                                           grepl("ROBOS$",familia_delito)~"VIOLENT CRIME",
                                                           grepl("LESIONES$",familia_delito)~"VIOLENT CRIME",
                                                           grepl("HOMICIDIOS$",familia_delito)~"VIOLENT CRIME",
                                                           grepl("DROGAS$",familia_delito)~"DRUG-RELATED CRIME",
                                                           grepl("RELEVANCIA",familia_delito)& grepl("DROGAS",gls_materia)~"DRUG-RELATED CRIME",
                                                           grepl("RELEVANCIA",familia_delito)& grepl("PRESUNTA",gls_materia)~"VIOLENT CRIME",
                                                           grepl("RELEVANCIA",familia_delito)& grepl("MUERTES",gls_materia)~"VIOLENT CRIME",
                                                           T~"OTHER CHARGES")) %>% 
         #janitor::tabyl(familia_delito,familia_delito_rec)
         janitor::tabyl(familia_delito_rec) %>% 
         dplyr::filter(familia_delito_rec=="VIOLENT CRIME") %>% 
         dplyr::mutate(percent=round(percent*100,1)) %>% 
         dplyr::select(percent) %>% 
         as.numeric(),"%"
)
## [1] "[CALCULATED WRONGLY]Percentage of patients involved in criminal processes (RUCs) as accused that were charged for violent crimes: 19.3%"
#El problema es que este porcentaje no está hecho de personas, sino de casos distintos. Para hacerlo por personas debo reagrupar por persona y contar si ha tenido delito de algun tipo.

paste0("[CALCULATED WRONGLY]Percentage of patients involved in criminal processes as accused that were charged for drug-related crimes: ",
         Base_fiscalia_v2 %>% 
         dplyr::filter(gls_mottermino!="Anulación de ingreso error de digitación"|is.na(gls_mottermino)) %>% 
        dplyr::filter(rut_enc_saf %in% unique(CONS_C1_df_dup_SEP_2020$hash_key)) %>% 
         dplyr::mutate(accused=dplyr::case_when(encontrado_como_victima=="SI" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                                  encontrado_como_victima=="NO" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                                  T~"VICTIMA")) %>% 
         dplyr::filter(accused=="IMPUTADO") %>% 
        # dplyr::slice(1:1000) %>% 
         dplyr::distinct(rut_enc_saf, ruc, gls_materia, .keep_all = T) %>% 
         dplyr::mutate(familia_delito_rec=dplyr::case_when(grepl("LESA HUMANIDAD",familia_delito)~"VIOLENT CRIME",
                                                           grepl("SEXUALES",familia_delito)~"VIOLENT CRIME",
                                                           grepl("ROBOS$",familia_delito)~"VIOLENT CRIME",
                                                           grepl("LESIONES$",familia_delito)~"VIOLENT CRIME",
                                                           grepl("HOMICIDIOS$",familia_delito)~"VIOLENT CRIME",
                                                           grepl("DROGAS$",familia_delito)~"DRUG-RELATED CRIME",
                                                           grepl("RELEVANCIA",familia_delito)& grepl("DROGAS",gls_materia)~"DRUG-RELATED CRIME",
                                                           grepl("RELEVANCIA",familia_delito)& grepl("PRESUNTA",gls_materia)~"VIOLENT CRIME",
                                                           grepl("RELEVANCIA",familia_delito)& grepl("MUERTES",gls_materia)~"VIOLENT CRIME",
                                                           T~"OTHER CHARGES")) %>% 
         #janitor::tabyl(familia_delito,familia_delito_rec)
         janitor::tabyl(familia_delito_rec) %>% 
         dplyr::filter(familia_delito_rec=="DRUG-RELATED CRIME") %>% 
         dplyr::mutate(percent=round(percent*100,1)) %>% 
         dplyr::select(percent) %>% 
         as.numeric(),"%"
)         
## [1] "[CALCULATED WRONGLY]Percentage of patients involved in criminal processes as accused that were charged for drug-related crimes: 2.7%"
#E:\Mi unidad\Alvacast\SISTRAT 2019 (github)\SER 2022 analyses.xlsx         
  
paste0("[CALCULATED WRONGLY] Percentage of patients involved in criminal processes as accused that had charges and resulted in full or partial incarceration: ",
         100-Base_fiscalia_v2 %>% 
         dplyr::filter(gls_mottermino!="Anulación de ingreso error de digitación"|is.na(gls_mottermino)) %>% 
        dplyr::filter(rut_enc_saf %in% unique(CONS_C1_df_dup_SEP_2020$hash_key)) %>% 
         dplyr::mutate(accused=dplyr::case_when(encontrado_como_victima=="SI" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                                  encontrado_como_victima=="NO" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                                  T~"VICTIMA")) %>% 
         dplyr::filter(accused=="IMPUTADO") %>%   
          dplyr::distinct(rut_enc_saf, ruc, gls_materia, .keep_all = T) %>% 
         #https://www.youtube.com/watch?v=wvb9WXMKQ1g
         janitor::tabyl(clasificacion_pena_47) %>% #clasificacion_pena_55)
      #  dplyr::filter(gls_mottermino=="Sentencia definitiva condenatoria") %>% 
       #  gls_proctermino 
        data.frame() %>% 
        dplyr::mutate(percent=round(percent*100,1)) %>% 
        dplyr::filter(is.na(clasificacion_pena_47)) %>% 
        dplyr::select(percent) %>% 
        as.numeric(),
      "%")
## [1] "[CALCULATED WRONGLY] Percentage of patients involved in criminal processes as accused that had charges and resulted in full or partial incarceration: 15.9%"
print("They were CALCULATED WRONGLY because the frequencies and percentages were not done by the percentage of patients, but by the percentage of combinations of different crimes, criminal process and patients")
## [1] "They were CALCULATED WRONGLY because the frequencies and percentages were not done by the percentage of patients, but by the percentage of combinations of different crimes, criminal process and patients"
cat("Generate a database with the count of charges by user")          
## Generate a database with the count of charges by user
charges_by_patients<-
Base_fiscalia_v2 %>% 
      dplyr::filter(gls_mottermino!="Anulación de ingreso error de digitación"|is.na(gls_mottermino)) %>% 
      dplyr::filter(rut_enc_saf %in% unique(CONS_C1_df_dup_SEP_2020$hash_key)) %>% 
      #563810
      dplyr::mutate(accused=dplyr::case_when(encontrado_como_victima=="SI" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                             encontrado_como_victima=="NO" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                             T~"VICTIMA")) %>% 
      dplyr::filter(accused=="IMPUTADO") %>% 
      # dplyr::slice(1:1000) %>% 
      dplyr::distinct(rut_enc_saf, ruc, gls_materia, .keep_all = T) %>% 
      dplyr::mutate(familia_delito_rec=dplyr::case_when(grepl("LESA HUMANIDAD",familia_delito)~"VIOLENT CRIME",
                                                        grepl("SEXUALES",familia_delito)~"VIOLENT CRIME",
                                                        grepl("ROBOS$",familia_delito)~"VIOLENT CRIME",
                                                        grepl("LESIONES$",familia_delito)~"VIOLENT CRIME",
                                                        grepl("HOMICIDIOS$",familia_delito)~"VIOLENT CRIME",
                                                        grepl("DROGAS$",familia_delito)~"DRUG-RELATED CRIME",
                                                        grepl("RELEVANCIA",familia_delito)& grepl("DROGAS",gls_materia)~"DRUG-RELATED CRIME",
                                                        grepl("RELEVANCIA",familia_delito)& grepl("PRESUNTA",gls_materia)~"VIOLENT CRIME",
                                                        grepl("RELEVANCIA",familia_delito)& grepl("MUERTES",gls_materia)~"VIOLENT CRIME",
                                                        T~"OTHER CHARGES")) %>% 
      dplyr::group_by(rut_enc_saf,familia_delito_rec) %>% 
      dplyr::count() %>% 
      tidyr::pivot_wider(names_from= familia_delito_rec, values_from= n, values_fill= 0) %>% 
      janitor::clean_names() %>%
      dplyr::ungroup() %>%
      dplyr::mutate(tot_charges=base::rowSums(dplyr::select(., 2:4)))

  #Un ejemplo
Base_fiscalia_v2 %>% 
    dplyr::filter(gls_mottermino!="Anulación de ingreso error de digitación"|is.na(gls_mottermino)) %>% 
    dplyr::filter(rut_enc_saf %in% unique(CONS_C1_df_dup_SEP_2020$hash_key)) %>% 
    #563810
    dplyr::mutate(accused=dplyr::case_when(encontrado_como_victima=="SI" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                           encontrado_como_victima=="NO" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                           T~"VICTIMA")) %>% 
    dplyr::filter(accused=="IMPUTADO") %>% 
    # dplyr::slice(1:1000) %>% 
    dplyr::distinct(rut_enc_saf, ruc, gls_materia, .keep_all = T) %>% 
    dplyr::mutate(familia_delito_rec=dplyr::case_when(grepl("LESA HUMANIDAD",familia_delito)~"VIOLENT CRIME",
                                                      grepl("SEXUALES",familia_delito)~"VIOLENT CRIME",
                                                      grepl("ROBOS$",familia_delito)~"VIOLENT CRIME",
                                                      grepl("LESIONES$",familia_delito)~"VIOLENT CRIME",
                                                      grepl("HOMICIDIOS$",familia_delito)~"VIOLENT CRIME",
                                                      grepl("DROGAS$",familia_delito)~"DRUG-RELATED CRIME",
                                                      grepl("RELEVANCIA",familia_delito)& grepl("DROGAS",gls_materia)~"DRUG-RELATED CRIME",
                                                      grepl("RELEVANCIA",familia_delito)& grepl("PRESUNTA",gls_materia)~"VIOLENT CRIME",
                                                      grepl("RELEVANCIA",familia_delito)& grepl("MUERTES",gls_materia)~"VIOLENT CRIME",
                                                      T~"OTHER CHARGES")) %>% 
    dplyr::filter(rut_enc_saf=="002c979e254773f17812d9bff13996dc") %>% 
    dplyr::select(rut_enc_saf, ruc, familia_delito_rec, gls_materia) %>% 
knitr::kable(format="html",caption="Table 8. An example of distinct combination of charges by different criminal processes") %>% 
  kableExtra::kable_classic(font_size = 11) %>% 
  kableExtra::scroll_box(width = "100%", height = "350px")
Table 8. An example of distinct combination of charges by different criminal processes
rut_enc_saf ruc familia_delito_rec gls_materia
002c979e254773f17812d9bff13996dc 1200372112-2 OTHER CHARGES FALSIFICACIÓN O USO MALICIOSO DE DOC. PRIVADOS ART.197 Y 198
002c979e254773f17812d9bff13996dc 1000224530-8 OTHER CHARGES HURTO SIMPLE POR UN VALOR DE 4 A 40 UTM
002c979e254773f17812d9bff13996dc 1000368025-3 OTHER CHARGES HURTO SIMPLE POR UN VALOR DE MEDIA A 4 UTM
002c979e254773f17812d9bff13996dc 1300041257-5 OTHER CHARGES FALSIFICACION O USO MALICIOSO DE DOCUMENTOS PUBLICOS
002c979e254773f17812d9bff13996dc 1300143564-1 VIOLENT CRIME LESIONES MENOS GRAVES
002c979e254773f17812d9bff13996dc 1001020522-6 OTHER CHARGES HURTO FALTA 494 BIS CÓDIGO PENAL
002c979e254773f17812d9bff13996dc 1301098596-4 OTHER CHARGES AMENAZAS CONDIC. CONTRA PERSONAS Y PROP. ART. 296 1 y 2, 297
002c979e254773f17812d9bff13996dc 1300915738-1 OTHER CHARGES USO FRAUDULENTO DE TARJETAS O MEDIOS DE PAGO. LEY 20.009
002c979e254773f17812d9bff13996dc 1300947940-0 OTHER CHARGES USO FRAUDULENTO DE TARJETAS O MEDIOS DE PAGO. LEY 20.009
002c979e254773f17812d9bff13996dc 1100196636-9 OTHER CHARGES HURTO FALTA 494 BIS CÓDIGO PENAL
002c979e254773f17812d9bff13996dc 1100125908-5 VIOLENT CRIME LESIONES MENOS GRAVES
002c979e254773f17812d9bff13996dc 1100118797-1 OTHER CHARGES HURTO FALTA 494 BIS CÓDIGO PENAL
002c979e254773f17812d9bff13996dc 1100769126-4 OTHER CHARGES FALSIFICACIÓN O USO MALICIOSO DE DOC. PRIVADOS ART.197 Y 198
002c979e254773f17812d9bff13996dc 1100969379-5 OTHER CHARGES DELITO DESÓRDENES PÚBLICOS ART. 269 (NO FALTA DEL CÓD 13035)
002c979e254773f17812d9bff13996dc 1201114024-4 OTHER CHARGES HURTO FALTA 494 BIS CÓDIGO PENAL
002c979e254773f17812d9bff13996dc 1100485721-8 OTHER CHARGES FALSIFICACIÓN O USO MALICIOSO DE DOC. PRIVADOS ART.197 Y 198
002c979e254773f17812d9bff13996dc 1200410556-5 OTHER CHARGES FALSIFICACIÓN O USO MALICIOSO DE DOC. PRIVADOS ART.197 Y 198
002c979e254773f17812d9bff13996dc 1200443291-4 OTHER CHARGES RECEPTACIÓN. ART. 456 BIS A
002c979e254773f17812d9bff13996dc 1200372112-2 OTHER CHARGES RECEPTACIÓN. ART. 456 BIS A
002c979e254773f17812d9bff13996dc 1200443291-4 OTHER CHARGES CONSUMO/PORTE EN LUG. PÚB.O PRIV. CON PREV.CONCIERTO(ART.50)
002c979e254773f17812d9bff13996dc 1400494045-9 OTHER CHARGES FALSIFICACIÓN O USO MALICIOSO DE DOC. PRIVADOS ART.197 Y 198
002c979e254773f17812d9bff13996dc 1410038401-K OTHER CHARGES FALSIFICACIÓN O USO MALICIOSO DE DOC. PRIVADOS ART.197 Y 198
002c979e254773f17812d9bff13996dc 1700286100-3 OTHER CHARGES ESTAFAS Y OTRAS DEFRAUDACIONES CONTRA PARTICULARES
002c979e254773f17812d9bff13996dc 1800445253-0 OTHER CHARGES ESTAFAS Y OTRAS DEFRAUDACIONES CONTRA PARTICULARES
002c979e254773f17812d9bff13996dc 1700517664-6 OTHER CHARGES ESTAFAS Y OTRAS DEFRAUDACIONES CONTRA PARTICULARES
002c979e254773f17812d9bff13996dc 1200582969-9 OTHER CHARGES ESTAFAS Y OTRAS DEFRAUDACIONES CONTRA PARTICULARES
002c979e254773f17812d9bff13996dc 1200582969-9 OTHER CHARGES FALSIFICACIÓN O USO MALICIOSO DE DOC. PRIVADOS ART.197 Y 198
002c979e254773f17812d9bff13996dc 1400546111-2 OTHER CHARGES ESTAFAS Y OTRAS DEFRAUDACIONES CONTRA PARTICULARES
002c979e254773f17812d9bff13996dc 1400546111-2 OTHER CHARGES FALSIFICACIÓN O USO MALICIOSO DE DOC. PRIVADOS ART.197 Y 198
002c979e254773f17812d9bff13996dc 1400546111-2 OTHER CHARGES FALSIFICACION O USO MALICIOSO DE DOCUMENTOS PUBLICOS
002c979e254773f17812d9bff13996dc 1400619296-4 OTHER CHARGES FALSIFICACION O USO MALICIOSO DE DOCUMENTOS PUBLICOS
002c979e254773f17812d9bff13996dc 1310026253-8 OTHER CHARGES USO FRAUDULENTO DE TARJETAS O MEDIOS DE PAGO. LEY 20.009
002c979e254773f17812d9bff13996dc 1401175419-9 OTHER CHARGES FALSIFICACIÓN O USO MALICIOSO DE DOC. PRIVADOS ART.197 Y 198
002c979e254773f17812d9bff13996dc 1701079586-9 OTHER CHARGES ESTAFAS Y OTRAS DEFRAUDACIONES CONTRA PARTICULARES
002c979e254773f17812d9bff13996dc 1800362990-9 OTHER CHARGES FALSIFICACIÓN O USO MALICIOSO DE DOC. PRIVADOS ART.197 Y 198
cases_by_patients<-
Base_fiscalia_v2 %>% 
      dplyr::filter(gls_mottermino!="Anulación de ingreso error de digitación"|is.na(gls_mottermino)) %>% 
      dplyr::filter(rut_enc_saf %in% unique(CONS_C1_df_dup_SEP_2020$hash_key)) %>% 
      #563810
      dplyr::mutate(accused=dplyr::case_when(encontrado_como_victima=="SI" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                             encontrado_como_victima=="NO" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                             T~"VICTIMA")) %>% 
      dplyr::filter(accused=="IMPUTADO") %>% 
      # dplyr::slice(1:1000) %>% 
      dplyr::distinct(rut_enc_saf, ruc, gls_materia, .keep_all = T) %>% 
      dplyr::mutate(familia_delito_rec=dplyr::case_when(grepl("LESA HUMANIDAD",familia_delito)~"VIOLENT CRIME",
                                                        grepl("SEXUALES",familia_delito)~"VIOLENT CRIME",
                                                        grepl("ROBOS$",familia_delito)~"VIOLENT CRIME",
                                                        grepl("LESIONES$",familia_delito)~"VIOLENT CRIME",
                                                        grepl("HOMICIDIOS$",familia_delito)~"VIOLENT CRIME",
                                                        grepl("DROGAS$",familia_delito)~"DRUG-RELATED CRIME",
                                                        grepl("RELEVANCIA",familia_delito)& grepl("DROGAS",gls_materia)~"DRUG-RELATED CRIME",
                                                        grepl("RELEVANCIA",familia_delito)& grepl("PRESUNTA",gls_materia)~"VIOLENT CRIME",
                                                        grepl("RELEVANCIA",familia_delito)& grepl("MUERTES",gls_materia)~"VIOLENT CRIME",
                                                        T~"OTHER CHARGES")) %>% 
      dplyr::group_by(rut_enc_saf,ruc) %>% 
      dplyr::count() 

paste0("Patients involved in criminal processes (RUCs) as accused were charged with an average of ",
       round(mean(charges_by_patients$tot_charges),1)," charged with an average of ", round(mean(cases_by_patients$n),1), " RUCs")
## [1] "Patients involved in criminal processes (RUCs) as accused were charged with an average of 5.6 charged with an average of 1.1 RUCs"
paste0("[CORRECTED]Percentage of patients involved in criminal processes (RUCs) as accused that have been charged for violent crimes: ",
       charges_by_patients %>% 
         dplyr::mutate(violent_crime_bin=ifelse(violent_crime>0,1,0)) %>% 
         janitor::tabyl(violent_crime_bin) %>% 
       data.frame() %>% 
        dplyr::filter(violent_crime_bin==1) %>% 
        dplyr::mutate(percent=round(percent*100,1)) %>% 
        dplyr::select(percent) %>% 
         as.numeric(),"%")
## [1] "[CORRECTED]Percentage of patients involved in criminal processes (RUCs) as accused that have been charged for violent crimes: 52.4%"
paste0("[CORRECTED]Percentage of patients involved in criminal processes as accused that have been charged for drug-related crimes: ",
       charges_by_patients %>% 
         dplyr::mutate(drug_related_crime_bin=ifelse(drug_related_crime>0,1,0)) %>% 
         janitor::tabyl(drug_related_crime_bin) %>% 
       data.frame() %>% 
        dplyr::filter(drug_related_crime_bin==1) %>% 
        dplyr::mutate(percent=round(percent*100,1)) %>% 
        dplyr::select(percent) %>% 
         as.numeric(),"%")       
## [1] "[CORRECTED]Percentage of patients involved in criminal processes as accused that have been charged for drug-related crimes: 11.2%"
paste0("[CORRECTED]Percentage of patients involved in criminal processes as accused that have been charged for other crimes: ",
              charges_by_patients %>% 
         dplyr::mutate(other_charges_bin=ifelse(other_charges>0,1,0)) %>% 
         janitor::tabyl(other_charges_bin) %>% 
       data.frame() %>% 
        dplyr::filter(other_charges_bin==1) %>% 
        dplyr::mutate(percent=round(percent*100,1)) %>% 
        dplyr::select(percent) %>% 
         as.numeric(),"%")       
## [1] "[CORRECTED]Percentage of patients involved in criminal processes as accused that have been charged for other crimes: 91.8%"
charges_by_patients_perc_pena<-
Base_fiscalia_v2 %>% 
      dplyr::filter(gls_mottermino!="Anulación de ingreso error de digitación"|is.na(gls_mottermino)) %>% 
      dplyr::filter(rut_enc_saf %in% unique(CONS_C1_df_dup_SEP_2020$hash_key)) %>% 
      #563810
      dplyr::mutate(accused=dplyr::case_when(encontrado_como_victima=="SI" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                             encontrado_como_victima=="NO" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                             T~"VICTIMA")) %>% 
      dplyr::filter(accused=="IMPUTADO") %>% 
      #The only difference that had with the other count
      dplyr::filter(!is.na(clasificacion_pena_47)) %>% 
      # dplyr::slice(1:1000) %>% 
      dplyr::distinct(rut_enc_saf, ruc, gls_materia, .keep_all = T) %>% 
      dplyr::mutate(familia_delito_rec=dplyr::case_when(grepl("LESA HUMANIDAD",familia_delito)~"VIOLENT CRIME",
                                                        grepl("SEXUALES",familia_delito)~"VIOLENT CRIME",
                                                        grepl("ROBOS$",familia_delito)~"VIOLENT CRIME",
                                                        grepl("LESIONES$",familia_delito)~"VIOLENT CRIME",
                                                        grepl("HOMICIDIOS$",familia_delito)~"VIOLENT CRIME",
                                                        grepl("DROGAS$",familia_delito)~"DRUG-RELATED CRIME",
                                                        grepl("RELEVANCIA",familia_delito)& grepl("DROGAS",gls_materia)~"DRUG-RELATED CRIME",
                                                        grepl("RELEVANCIA",familia_delito)& grepl("PRESUNTA",gls_materia)~"VIOLENT CRIME",
                                                        grepl("RELEVANCIA",familia_delito)& grepl("MUERTES",gls_materia)~"VIOLENT CRIME",
                                                        T~"OTHER CHARGES")) %>% 
      dplyr::group_by(rut_enc_saf,familia_delito_rec) %>% 
      dplyr::count() %>% 
      tidyr::pivot_wider(names_from= familia_delito_rec, values_from= n, values_fill= 0) %>% 
      janitor::clean_names() %>%
      dplyr::ungroup() %>%
      dplyr::mutate(tot_charges=base::rowSums(dplyr::select(., 2:4)))

hist(charges_by_patients$tot_charges, breaks=100, xlim=c(0,50), main="N of different Charges in RUCs", xlab=NULL)
mtext("Limited to the first 50 combinations of patients, criminal processes & crimes")


Only a 22% had only one charge throughout Prosecutor’s office records.


paste0("[CORRECTED] Percentage of patients involved in criminal processes as accused that had charges and resulted in full or partial incarceration: ",
       scales::percent(nrow(charges_by_patients_perc_pena)/nrow(charges_by_patients), accuracy=0.1),
       "")
## [1] "[CORRECTED] Percentage of patients involved in criminal processes as accused that had charges and resulted in full or partial incarceration: 36.6%"
scales::percent(
charges_by_patients_perc_pena %>% 
    dplyr::left_join(dplyr::filter(CONS_C1_df_dup_SEP_2020[,c("hash_key","dup","fech_egres_imp","motivodeegreso_mod_imp")], dup==1), by=c("rut_enc_saf"="hash_key")) %>% 
  janitor::tabyl(motivodeegreso_mod_imp)%>% 
  dplyr::filter(motivodeegreso_mod_imp=="Therapeutic discharge") %>% 
  dplyr::select(n) %>% 
  as.numeric()/
charges_by_patients %>% 
    dplyr::left_join(dplyr::filter(CONS_C1_df_dup_SEP_2020[,c("hash_key","dup","fech_egres_imp","motivodeegreso_mod_imp")], dup==1), by=c("rut_enc_saf"="hash_key")) %>% 
  janitor::tabyl(motivodeegreso_mod_imp)%>% 
  dplyr::filter(motivodeegreso_mod_imp=="Therapeutic discharge") %>% 
  dplyr::select(n) %>% 
  as.numeric() 
)
## [1] "30%"
paste0("Percentage of patients involved in criminal processes as accused that had charges and resulted in full or partial incarceration of those who Completed their first treatment (percentage discarded ongoing treatments): ",
scales::percent(
charges_by_patients_perc_pena %>% 
    dplyr::left_join(dplyr::filter(CONS_C1_df_dup_SEP_2020[,c("hash_key","dup","fech_egres_imp","motivodeegreso_mod_imp")], dup==1), by=c("rut_enc_saf"="hash_key")) %>% 
  dplyr::mutate(motivodeegreso_mod_imp_rec=ifelse(motivodeegreso_mod_imp=="Therapeutic discharge",1,0)) %>% 
  dplyr::filter(motivodeegreso_mod_imp!="Ongoing treatment") %>% 
  janitor::tabyl(motivodeegreso_mod_imp_rec)%>% 
  dplyr::filter(motivodeegreso_mod_imp_rec==1) %>% 
  dplyr::select(n) %>% 
  as.numeric()/
charges_by_patients %>% 
    dplyr::left_join(dplyr::filter(CONS_C1_df_dup_SEP_2020[,c("hash_key","dup","fech_egres_imp","motivodeegreso_mod_imp")], dup==1), by=c("rut_enc_saf"="hash_key")) %>% 
  dplyr::mutate(motivodeegreso_mod_imp_rec=ifelse(motivodeegreso_mod_imp=="Therapeutic discharge",1,0)) %>% 
  dplyr::filter(motivodeegreso_mod_imp!="Ongoing treatment") %>% 
  janitor::tabyl(motivodeegreso_mod_imp_rec)%>% 
  dplyr::filter(motivodeegreso_mod_imp_rec==1) %>%  
  dplyr::select(n) %>% 
  as.numeric() 
))
## [1] "Percentage of patients involved in criminal processes as accused that had charges and resulted in full or partial incarceration of those who Completed their first treatment (percentage discarded ongoing treatments): 30%"
paste0("Percentage of patients involved in criminal processes as accused that had charges and resulted in full or partial incarceration of those who did not Complete their first treatment (percentage discarded ongoing treatments): ",
scales::percent(
charges_by_patients_perc_pena %>% 
    dplyr::left_join(dplyr::filter(CONS_C1_df_dup_SEP_2020[,c("hash_key","dup","fech_egres_imp","motivodeegreso_mod_imp")], dup==1), by=c("rut_enc_saf"="hash_key")) %>% 
  dplyr::mutate(motivodeegreso_mod_imp_rec=ifelse(motivodeegreso_mod_imp=="Therapeutic discharge",1,0)) %>% 
  dplyr::filter(motivodeegreso_mod_imp!="Ongoing treatment") %>% 
  janitor::tabyl(motivodeegreso_mod_imp_rec)%>% 
  dplyr::filter(motivodeegreso_mod_imp_rec==0) %>% 
  dplyr::select(n) %>% 
  as.numeric()/
charges_by_patients %>% 
    dplyr::left_join(dplyr::filter(CONS_C1_df_dup_SEP_2020[,c("hash_key","dup","fech_egres_imp","motivodeegreso_mod_imp")], dup==1), by=c("rut_enc_saf"="hash_key")) %>% 
  dplyr::mutate(motivodeegreso_mod_imp_rec=ifelse(motivodeegreso_mod_imp=="Therapeutic discharge",1,0)) %>% 
  dplyr::filter(motivodeegreso_mod_imp!="Ongoing treatment") %>% 
  janitor::tabyl(motivodeegreso_mod_imp_rec)%>% 
  dplyr::filter(motivodeegreso_mod_imp_rec==0) %>% 
  dplyr::select(n) %>% 
  as.numeric() 
))
## [1] "Percentage of patients involved in criminal processes as accused that had charges and resulted in full or partial incarceration of those who did not Complete their first treatment (percentage discarded ongoing treatments): 39%"
paste0("[CORRECTED] Percentage of patients involved in criminal processes as accused that had charges and resulted in full or partial incarceration: ",
       scales::percent(nrow(charges_by_patients_perc_pena)/nrow(charges_by_patients), accuracy=0.1),
       "")
## [1] "[CORRECTED] Percentage of patients involved in criminal processes as accused that had charges and resulted in full or partial incarceration: 36.6%"
invisible("Diferencia cargos criminales")
paste0("On average, people that completed their first treatment had a difference of XX in criminal charges (discarding Ongoing treatments)")
## [1] "On average, people that completed their first treatment had a difference of XX in criminal charges (discarding Ongoing treatments)"
t.test(tot_charges~factor(tr_comp),
charges_by_patients %>% 
  dplyr::left_join(dplyr::filter(CONS_C1_df_dup_SEP_2020[,c("hash_key","dup","fech_egres_imp","motivodeegreso_mod_imp")], dup==1), by=c("rut_enc_saf"="hash_key")) %>%
  #janitor::tabyl(motivodeegreso_mod_imp) %>% 
  dplyr::filter(motivodeegreso_mod_imp!="Ongoing treatment") %>% 
  dplyr::mutate(tr_comp=ifelse(motivodeegreso_mod_imp=="Therapeutic discharge",1,0)))

    Welch Two Sample t-test

data:  tot_charges by factor(tr_comp)
t = 33.371, df = 25336, p-value < 0.00000000000000022
alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
95 percent confidence interval:
 1.690227 1.901171
sample estimates:
mean in group 0 mean in group 1 
       6.011362        4.215663 
round(6.011362-4.215663,2) #1.8
## [1] 1.8
paste0("On average, people that completed their first treatment had a difference of XX in criminal charges [w/ ongoing treatments as non-completion]")
## [1] "On average, people that completed their first treatment had a difference of XX in criminal charges [w/ ongoing treatments as non-completion]"
t.test(tot_charges~factor(tr_comp),
charges_by_patients %>% 
  dplyr::left_join(dplyr::filter(CONS_C1_df_dup_SEP_2020[,c("hash_key","dup","fech_egres_imp","motivodeegreso_mod_imp")], dup==1), by=c("rut_enc_saf"="hash_key")) %>%
  #janitor::tabyl(motivodeegreso_mod_imp) %>% 
  #dplyr::filter(motivodeegreso_mod_imp!="Ongoing treatment") %>% 
  dplyr::mutate(tr_comp=ifelse(motivodeegreso_mod_imp=="Therapeutic discharge",1,0)))

    Welch Two Sample t-test

data:  tot_charges by factor(tr_comp)
t = 31.388, df = 24064, p-value < 0.00000000000000022
alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
95 percent confidence interval:
 1.557897 1.765428
sample estimates:
mean in group 0 mean in group 1 
       5.877325        4.215663 
round(5.877325-4.215663,2) #1.66
## [1] 1.66
invisible("Diferencia cargos criminales violentos")
paste0("On average, people that completed their first treatment had a difference of XX in violent criminal charges (discarding Ongoing treatments)")
## [1] "On average, people that completed their first treatment had a difference of XX in violent criminal charges (discarding Ongoing treatments)"
t.test(violent_crime~factor(tr_comp),
charges_by_patients %>% 
  dplyr::left_join(dplyr::filter(CONS_C1_df_dup_SEP_2020[,c("hash_key","dup","fech_egres_imp","motivodeegreso_mod_imp")], dup==1), by=c("rut_enc_saf"="hash_key")) %>%
  #janitor::tabyl(motivodeegreso_mod_imp) %>% 
  dplyr::filter(motivodeegreso_mod_imp!="Ongoing treatment") %>% 
  dplyr::mutate(tr_comp=ifelse(motivodeegreso_mod_imp=="Therapeutic discharge",1,0)))

    Welch Two Sample t-test

data:  violent_crime by factor(tr_comp)
t = 21.32, df = 23738, p-value < 0.00000000000000022
alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
95 percent confidence interval:
 0.2707974 0.3256311
sample estimates:
mean in group 0 mean in group 1 
      1.1451374       0.8469231 
round(1.1451374-0.8469231,2) #0.3
## [1] 0.3
paste0("On average, people that completed their first treatment had a difference of XX in violent criminal charges [w/ ongoing treatments as non-completion]")
## [1] "On average, people that completed their first treatment had a difference of XX in violent criminal charges [w/ ongoing treatments as non-completion]"
t.test(violent_crime~factor(tr_comp),
charges_by_patients %>% 
  dplyr::left_join(dplyr::filter(CONS_C1_df_dup_SEP_2020[,c("hash_key","dup","fech_egres_imp","motivodeegreso_mod_imp")], dup==1), by=c("rut_enc_saf"="hash_key")) %>%
  #janitor::tabyl(motivodeegreso_mod_imp) %>% 
  #dplyr::filter(motivodeegreso_mod_imp!="Ongoing treatment") %>% 
  dplyr::mutate(tr_comp=ifelse(motivodeegreso_mod_imp=="Therapeutic discharge",1,0)))

    Welch Two Sample t-test

data:  violent_crime by factor(tr_comp)
t = 20.4, df = 22711, p-value < 0.00000000000000022
alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
95 percent confidence interval:
 0.2544582 0.3085524
sample estimates:
mean in group 0 mean in group 1 
      1.1284284       0.8469231 
round(1.1284284-0.8469231,2) #0.28
## [1] 0.28
#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_
#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_
invisible("% cargos criminales con condena")
paste0("incarceration resulted in X% of the times vs. X%, respectively")
## [1] "incarceration resulted in X% of the times vs. X%, respectively"
t.test(tot_charges~factor(tr_comp),
charges_by_patients_perc_pena%>% 
  dplyr::left_join(dplyr::filter(CONS_C1_df_dup_SEP_2020[,c("hash_key","dup","fech_egres_imp","motivodeegreso_mod_imp")], dup==1), by=c("rut_enc_saf"="hash_key")) %>%
  #janitor::tabyl(motivodeegreso_mod_imp) %>% 
  dplyr::filter(motivodeegreso_mod_imp!="Ongoing treatment") %>% 
  dplyr::mutate(tr_comp=ifelse(motivodeegreso_mod_imp=="Therapeutic discharge",1,0)))

    Welch Two Sample t-test

data:  tot_charges by factor(tr_comp)
t = 10.867, df = 5972.8, p-value < 0.00000000000000022
alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
95 percent confidence interval:
 0.3360057 0.4839218
sample estimates:
mean in group 0 mean in group 1 
       2.505486        2.095522 
paste0("Not completed treatment: ", scales::percent(2.505486/6.011362))
## [1] "Not completed treatment: 42%"
paste0("Completed treatment: ", scales::percent(2.095522/4.215663))
## [1] "Completed treatment: 50%"
t.test(tot_charges~factor(tr_comp),
charges_by_patients_perc_pena%>% 
  dplyr::left_join(dplyr::filter(CONS_C1_df_dup_SEP_2020[,c("hash_key","dup","fech_egres_imp","motivodeegreso_mod_imp")], dup==1), by=c("rut_enc_saf"="hash_key")) %>%
  #janitor::tabyl(motivodeegreso_mod_imp) %>% 
  #dplyr::filter(motivodeegreso_mod_imp!="Ongoing treatment") %>% 
  dplyr::mutate(tr_comp=ifelse(motivodeegreso_mod_imp=="Therapeutic discharge",1,0)))

    Welch Two Sample t-test

data:  tot_charges by factor(tr_comp)
t = 10.182, df = 5812.7, p-value < 0.00000000000000022
alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
95 percent confidence interval:
 0.3078767 0.4546902
sample estimates:
mean in group 0 mean in group 1 
       2.476806        2.095522 
print("w/ ongoing treatments")
## [1] "w/ ongoing treatments"
paste0("Not completed treatment: ", scales::percent(2.476806/5.877325))
## [1] "Not completed treatment: 42%"
paste0("Completed treatment: ", scales::percent(2.095522/4.215663))
## [1] "Completed treatment: 50%"
invisible("% cargos criminales violentos con condena")
t.test(violent_crime~factor(tr_comp),
charges_by_patients_perc_pena%>% 
  dplyr::left_join(dplyr::filter(CONS_C1_df_dup_SEP_2020[,c("hash_key","dup","fech_egres_imp","motivodeegreso_mod_imp")], dup==1), by=c("rut_enc_saf"="hash_key")) %>%
  #janitor::tabyl(motivodeegreso_mod_imp) %>% 
  dplyr::filter(motivodeegreso_mod_imp!="Ongoing treatment") %>% 
  dplyr::mutate(tr_comp=ifelse(motivodeegreso_mod_imp=="Therapeutic discharge",1,0)))

    Welch Two Sample t-test

data:  violent_crime by factor(tr_comp)
t = 8.3303, df = 6000.6, p-value < 0.00000000000000022
alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
95 percent confidence interval:
 0.06268207 0.10126311
sample estimates:
mean in group 0 mean in group 1 
      0.3563281       0.2743555 
# mean in group 0 mean in group 1 
#        2.476806        2.095522 
paste0("Not completed treatment: ", scales::percent(0.3563281/1.1451374))
## [1] "Not completed treatment: 31%"
paste0("Completed treatment: ", scales::percent(0.2743555 /0.8469231))
## [1] "Completed treatment: 32%"
t.test(violent_crime~factor(tr_comp),
charges_by_patients_perc_pena%>% 
  dplyr::left_join(dplyr::filter(CONS_C1_df_dup_SEP_2020[,c("hash_key","dup","fech_egres_imp","motivodeegreso_mod_imp")], dup==1), by=c("rut_enc_saf"="hash_key")) %>%
  #janitor::tabyl(motivodeegreso_mod_imp) %>% 
  #dplyr::filter(motivodeegreso_mod_imp!="Ongoing treatment") %>% 
  dplyr::mutate(tr_comp=ifelse(motivodeegreso_mod_imp=="Therapeutic discharge",1,0)))

    Welch Two Sample t-test

data:  violent_crime by factor(tr_comp)
t = 8.1931, df = 5853.3, p-value = 0.0000000000000003099
alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
95 percent confidence interval:
 0.06091133 0.09922801
sample estimates:
mean in group 0 mean in group 1 
      0.3544252       0.2743555 
print("w/ ongoing treatments")
## [1] "w/ ongoing treatments"
paste0("Not completed treatment: ", scales::percent(0.3544252/1.1284284))
## [1] "Not completed treatment: 31%"
paste0("Completed treatment: ", scales::percent(0.2743555 /0.8469231))
## [1] "Completed treatment: 32%"
#round(6.011362-4.215663,2) #1.8 && round(5.877325-4.215663,2) #1.66 && round(1.1451374-0.8469231,2) #0.3 && round(1.1284284-0.8469231,2) #0.28

#_#_#_#_#_#_#_#_#_#_#_

# charges_by_patients %>% 
#     dplyr::left_join(dplyr::filter(CONS_C1_df_dup_SEP_2020[,c("hash_key","dup","fech_egres_imp","motivodeegreso_mod_imp")], dup==1), by=c("rut_enc_saf"="hash_key")) 
#_#_#_#_#_#_#_#_#_#_#_
#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_#_
#_#_#_#_#_#_#_#_#_#_#_

#casos con +1 relación --> si siempre hay sólo una sentencia o una pena, para ver si tiene sentido agrupar hasta casi relación o si no sólo por RUC

charges_by_patients2<-
Base_fiscalia_v2 %>% 
      dplyr::filter(gls_mottermino!="Anulación de ingreso error de digitación"|is.na(gls_mottermino)) %>% 
      dplyr::filter(rut_enc_saf %in% unique(CONS_C1_df_dup_SEP_2020$hash_key)) %>% 
      #563810
      dplyr::mutate(accused=dplyr::case_when(encontrado_como_victima=="SI" & encontrado_como_imputado=="SI"~"IMPUTADO", encontrado_como_victima=="NO" & encontrado_como_imputado=="SI"~"IMPUTADO", T~"VICTIMA")) %>% 
      dplyr::filter(accused=="IMPUTADO") %>% 
       #dplyr::slice(1:10000) %>% 
      dplyr::distinct(rut_enc_saf, ruc, gls_materia, .keep_all = T) %>% 
      dplyr::mutate(familia_delito_rec=dplyr::case_when(grepl("LESA HUMANIDAD",familia_delito)~"VIOLENT CRIME",
                                                        grepl("SEXUALES",familia_delito)~"VIOLENT CRIME",
                                                        grepl("ROBOS$",familia_delito)~"VIOLENT CRIME",
                                                        grepl("LESIONES$",familia_delito)~"VIOLENT CRIME",
                                                        grepl("HOMICIDIOS$",familia_delito)~"VIOLENT CRIME",
                                                        grepl("DROGAS$",familia_delito)~"DRUG-RELATED CRIME",
                                                        grepl("RELEVANCIA",familia_delito)& grepl("DROGAS",gls_materia)~"DRUG-RELATED CRIME",
                                                        grepl("RELEVANCIA",familia_delito)& grepl("PRESUNTA",gls_materia)~"VIOLENT CRIME",
                                                        grepl("RELEVANCIA",familia_delito)& grepl("MUERTES",gls_materia)~"VIOLENT CRIME",
                                                        T~"OTHER CHARGES")) %>% 
  dplyr::ungroup() %>% 
  dplyr::group_by(rut_enc_saf, ruc) %>% 
  dplyr::summarise(n_dis_pena= dplyr::n_distinct(clasificacion_pena_47)) %>% 
  dplyr::summarise(n_dis_pena= dplyr::n_distinct(clasificacion_pena_47))

if(no_mostrar==0){
charges_by_patients2 %>% 
    dplyr::filter(n_dis_pena>1)
  #0132d51e61c2c776cb2474011e232c87 0900581579-4
  #1f3eba4d3bce03d07b1b8e3d6f8179a0 0910018335-5
  
#Ejemplos
  Base_fiscalia_v2 %>% 
      dplyr::filter(gls_mottermino!="Anulación de ingreso error de digitación"|is.na(gls_mottermino)) %>% 
      dplyr::filter(rut_enc_saf %in% unique(CONS_C1_df_dup_SEP_2020$hash_key)) %>% 
      #563810
      dplyr::mutate(accused=dplyr::case_when(encontrado_como_victima=="SI" & encontrado_como_imputado=="SI"~"IMPUTADO", encontrado_como_victima=="NO" & encontrado_como_imputado=="SI"~"IMPUTADO", T~"VICTIMA")) %>% 
      dplyr::filter(accused=="IMPUTADO") %>% 
       #dplyr::slice(1:10000) %>% 
      dplyr::distinct(rut_enc_saf, ruc, gls_materia, .keep_all = T) %>% 
      dplyr::mutate(familia_delito_rec=dplyr::case_when(grepl("LESA HUMANIDAD",familia_delito)~"VIOLENT CRIME",
                                                        grepl("SEXUALES",familia_delito)~"VIOLENT CRIME",
                                                        grepl("ROBOS$",familia_delito)~"VIOLENT CRIME",
                                                        grepl("LESIONES$",familia_delito)~"VIOLENT CRIME",
                                                        grepl("HOMICIDIOS$",familia_delito)~"VIOLENT CRIME",
                                                        grepl("DROGAS$",familia_delito)~"DRUG-RELATED CRIME",
                                                        grepl("RELEVANCIA",familia_delito)& grepl("DROGAS",gls_materia)~"DRUG-RELATED CRIME",
                                                        grepl("RELEVANCIA",familia_delito)& grepl("PRESUNTA",gls_materia)~"VIOLENT CRIME",
                                                        grepl("RELEVANCIA",familia_delito)& grepl("MUERTES",gls_materia)~"VIOLENT CRIME",
                                                        T~"OTHER CHARGES")) %>% 
  dplyr::filter(rut_enc_saf=="1f3eba4d3bce03d07b1b8e3d6f8179a0", ruc=="0910018335-5") %>% View()
  
invisible(paste0("De 330,097 casos, sólo 3,618 obtuvieron más de 1 pena distinta (1,09%)"))
}

#_#_#_#_#_#_#_#_#_
if(no_mostrar==0){
 Base_fiscalia_v2 %>% 
      dplyr::filter(gls_mottermino!="Anulación de ingreso error de digitación"|is.na(gls_mottermino)) %>% 
      dplyr::filter(rut_enc_saf %in% unique(CONS_C1_df_dup_SEP_2020$hash_key)) %>% 
      #563810
      dplyr::mutate(accused=dplyr::case_when(encontrado_como_victima=="SI" & encontrado_como_imputado=="SI"~"IMPUTADO", encontrado_como_victima=="NO" & encontrado_como_imputado=="SI"~"IMPUTADO", T~"VICTIMA")) %>% 
      dplyr::filter(accused=="IMPUTADO") %>% 
      #dplyr::slice(1:10000) %>% 
      dplyr::distinct(rut_enc_saf, ruc, gls_materia, .keep_all = T) %>% 
      dplyr::mutate(familia_delito_rec=dplyr::case_when(grepl("LESA HUMANIDAD",familia_delito)~"VIOLENT CRIME",
                                                        grepl("SEXUALES",familia_delito)~"VIOLENT CRIME",
                                                        grepl("ROBOS$",familia_delito)~"VIOLENT CRIME",
                                                        grepl("LESIONES$",familia_delito)~"VIOLENT CRIME",
                                                        grepl("HOMICIDIOS$",familia_delito)~"VIOLENT CRIME",
                                                        grepl("DROGAS$",familia_delito)~"DRUG-RELATED CRIME",
                                                        grepl("RELEVANCIA",familia_delito)& grepl("DROGAS",gls_materia)~"DRUG-RELATED CRIME",
                                                        grepl("RELEVANCIA",familia_delito)& grepl("PRESUNTA",gls_materia)~"VIOLENT CRIME",
                                                        grepl("RELEVANCIA",familia_delito)& grepl("MUERTES",gls_materia)~"VIOLENT CRIME",
                                                        T~"OTHER CHARGES")) %>% 
  dplyr::distinct(rut_enc_saf, ruc, gls_materia, .keep_all = T) %>% 
  dplyr::ungroup() %>% 
  dplyr::group_by(rut_enc_saf, ruc) %>% 
  dplyr::mutate(n_dis_pena= dplyr::n_distinct(clasificacion_pena_47)) %>% 
   dplyr::ungroup() %>% 
  dplyr::filter(dplyr::case_when(n_dis_pena>1 & gls_mottermino!="Sentencia definitiva condenatoria"~F,
                   T ~ T)) %>% 
   dplyr::select(rut_enc_saf, ruc, gls_materia, n_dis_pena, gls_mottermino, fec_cbiorelacion) %>% 
   dplyr::group_by(rut_enc_saf, ruc) %>%
   dplyr::add_count(name="n_cases") %>% 
   dplyr::ungroup() %>%
   dplyr::filter(n_cases>1) %>% View()
invisible("Casos con el mismo RUT y RUC, pero con distinto motivo de término en el mismo caso, incluso habiendo echo el filtro")
}
 
 #350,660 
 
 
#_#_#_#_#_#_#_#_#_

      # dplyr::add_count(name="n_") %>% 
      # tidyr::pivot_wider(names_from= familia_delito_rec, values_from= n, values_fill= 0) %>% 
      # janitor::clean_names() %>%
      # dplyr::ungroup() %>%
      # dplyr::mutate(tot_charges=base::rowSums(dplyr::select(., 2:4)))


Codebook

knitr::opts_chunk$set(
  warning = TRUE, # show warnings during codebook generation
  message = TRUE, # show messages during codebook generation
  error = TRUE, # do not interrupt codebook generation in case of errors,
                # usually better for debugging
  echo = TRUE  # show R code
)
ggplot2::theme_set(ggplot2::theme_bw())
pander::panderOptions("table.split.table", Inf)

if(!require(codebook)){install.packages("codebook")}
if(!require(future)){install.packages("future")}
## Loading required package: future
## 
## Attaching package: 'future'
## The following object is masked from 'package:ggstatsplot':
## 
##     %<-%
## The following object is masked from 'package:caret':
## 
##     cluster
## The following objects are masked from 'package:igraph':
## 
##     %->%, %<-%
## The following object is masked from 'package:survival':
## 
##     cluster
if(!require(dplyr)){install.packages("dplyr")}
codebook_data <- dplyr::select(Base_fiscalia_v2, -c("rut_enc_saf","ruc","idrelacion","cod_delito","cod_lugarocurrencia","cod_parentescoimputado","cod_mottermino","cod_motsuspension","cod_proctermino","idsujeto_imputado","impcod_tiposujeto","cod_lugarocurrencia","cod_sitiosuceso","cod_comunadelito","cod_region", "iddelito"))

muestra=0
if(muestra==1){
# omit the following lines, if your missing values are already properly labelled
codebook_data <- detect_missing(codebook_data,
    only_labelled = TRUE, # only labelled values are autodetected as
                                   # missing
    negative_values_are_missing = FALSE, # negative values are missing values
    ninety_nine_problems = FALSE,   # 99/999 are missing values, if they
                                   # are more than 5 MAD from the median
    )
}
# If you are not using formr, the codebook package needs to guess which items
# form a scale. The following line finds item aggregates with names like this:
# scale = scale_1 + scale_2R + scale_3R
# identifying these aggregates allows the codebook function to
# automatically compute reliabilities.
# However, it will not reverse items automatically.
#codebook_data <- detect_scales(codebook_data)


In the following Tables and graphics, there is a summary of the variables and documentation of their characteristics. This high-level summary may permit us find errors on coding, help us to understand missingness and guide us towards an objective, or lead us to more questions. If a variable contains the symbol (*), it means that this variable has a concatenation of values among continuous entries in treatments.


  metadata(codebook_data)$name <- "Prosecutor Support System (SAF), database of the Public Prosecutor's Office."
  metadata(codebook_data)$description <- "The information was extracted and processed from the Prosecutor Support System (SAF) database in accordance with the criteria established in the methodological document 'Criteria for Extracting Information from the SAF - 11_04_2018', prepared and updated in 2018 by the Studies, Evaluation, Control and Management Development Division. Data obtained at 2021-08-13; Period= 2010 to 2019; Unit of measurement= Relationships; Offenses considered= All; Date to consider= Date of termination of the case; National Coverage; Detail or summary= Detail; In the search for victims, only direct victims were considered; The RUTs indicated are searched only in cases terminated or suspended in the period 2010 - 2019;
The following types of accused are considered: COMPLAINED, ACCUSED, QUERELLED, WITNESS, SUSPECTED AND INVESTIGATED"

codebook(codebook_data)

Metadata

Description

Dataset name: Prosecutor Support System (SAF), database of the Public Prosecutor’s Office.

The information was extracted and processed from the Prosecutor Support System (SAF) database in accordance with the criteria established in the methodological document ‘Criteria for Extracting Information from the SAF - 11_04_2018’, prepared and updated in 2018 by the Studies, Evaluation, Control and Management Development Division. Data obtained at 2021-08-13; Period= 2010 to 2019; Unit of measurement= Relationships; Offenses considered= All; Date to consider= Date of termination of the case; National Coverage; Detail or summary= Detail; In the search for victims, only direct victims were considered; The RUTs indicated are searched only in cases terminated or suspended in the period 2010 - 2019; The following types of accused are considered: COMPLAINED, ACCUSED, QUERELLED, WITNESS, SUSPECTED AND INVESTIGATED

Metadata for search engines
  • Date published: 2022-03-16
x
fec_nacimiento
pais
sexo
encontrado_como_victima
encontrado_como_imputado
tipo_sujeto_vic
gls_tipo_sujeto_vic
idsujeto_victima
reg
gls_region
tipo_termino
agrupa_terminos
gls_materia
familia_delito
relacion_vifsaf
gls_parentesco
gls_mottermino
gls_motsuspension
gls_proctermino
gls_tipo_imputado
fec_comision
termino_relacion
lugar_ocurrencia
gls_sitiosuceso
gls_comuna
region_delito
fec_cbiorelacion
medidas_155
medidas_pp
medidas_ip
marca_suspension_43
marca_pena_44
marca_multa_45
medida_alternativa_46
clasificacion_pena_47
tramos_condena_48
clasificacion_penarpa_1_49
clasificacion_penarpa_2_50
marca_suspension_51
marca_pena_52
marca_multa_53
medida_alternativa_54
clasificacion_pena_55
tramos_condena_56
clasificacion_penarpa_1_57
clasificacion_penarpa_2_58
fec_comision_simple
fec_cbiorelacion_simple
fec_nacimiento_simple
termino_relacion_simple
edad_comision
edad_ter_rel

#Variables

fec_nacimiento

Distribution

Distribution of values for fec_nacimiento

Distribution of values for fec_nacimiento

0 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
fec_nacimiento character 0 1 16430 0 19 19 0

pais

Distribution

Distribution of values for pais

Distribution of values for pais

0 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
pais character 0 1 20 0 4 20 0

sexo

Distribution

Distribution of values for sexo

Distribution of values for sexo

0 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
sexo character 0 1 3 0 8 11 0

encontrado_como_victima

Distribution

Distribution of values for encontrado_como_victima

Distribution of values for encontrado_como_victima

0 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
encontrado_como_victima character 0 1 2 0 2 2 0

encontrado_como_imputado

Distribution

Distribution of values for encontrado_como_imputado

Distribution of values for encontrado_como_imputado

0 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
encontrado_como_imputado character 0 1 2 0 2 2 0

tipo_sujeto_vic

Distribution

Distribution of values for tipo_sujeto_vic

Distribution of values for tipo_sujeto_vic

18053 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
tipo_sujeto_vic character 18053 0.9682332 8 0 1 2 0

gls_tipo_sujeto_vic

Distribution

Distribution of values for gls_tipo_sujeto_vic

Distribution of values for gls_tipo_sujeto_vic

18053 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
gls_tipo_sujeto_vic character 18053 0.9682332 8 0 7 19 0

idsujeto_victima

Distribution

Distribution of values for idsujeto_victima

Distribution of values for idsujeto_victima

0 missing values.

Summary statistics

name data_type n_missing complete_rate min median max mean sd hist label
idsujeto_victima numeric 0 1 0 48183970 84105717 47784904 17843954 <U+2581><U+2585><U+2587><U+2587><U+2585>

reg

Distribution

Distribution of values for reg

Distribution of values for reg

0 missing values.

Summary statistics

name data_type n_missing complete_rate min median max mean sd hist label
reg numeric 0 1 1 11 20 10.69546 5.481066 <U+2583><U+2587><U+2582><U+2587><U+2583>

gls_region

Distribution

Distribution of values for gls_region

Distribution of values for gls_region

0 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
gls_region character 0 1 19 0 6 50 0

tipo_termino

Distribution

Distribution of values for tipo_termino

Distribution of values for tipo_termino

21 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
tipo_termino character 21 0.999963 3 0 14 18 0

agrupa_terminos

Distribution

Distribution of values for agrupa_terminos

Distribution of values for agrupa_terminos

21 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
agrupa_terminos character 21 0.999963 16 0 13 40 0

gls_materia

Distribution

Distribution of values for gls_materia

Distribution of values for gls_materia

0 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
gls_materia character 0 1 354 0 7 60 0

familia_delito

Distribution

Distribution of values for familia_delito

Distribution of values for familia_delito

0 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
familia_delito character 0 1 21 0 5 60 0

relacion_vifsaf

Distribution

Distribution of values for relacion_vifsaf

Distribution of values for relacion_vifsaf

0 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
relacion_vifsaf character 0 1 2 0 2 2 0

gls_parentesco

Distribution

Distribution of values for gls_parentesco

Distribution of values for gls_parentesco

452460 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
gls_parentesco character 452460 0.2038318 25 0 5 28 0

gls_mottermino

Distribution

Distribution of values for gls_mottermino

Distribution of values for gls_mottermino

10353 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
gls_mottermino character 10353 0.9817824 25 0 8 40 0

gls_motsuspension

Distribution

Distribution of values for gls_motsuspension

Distribution of values for gls_motsuspension

493206 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
gls_motsuspension character 493206 0.1321334 5 0 19 40 0

gls_proctermino

Distribution

Distribution of values for gls_proctermino

Distribution of values for gls_proctermino

0 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
gls_proctermino character 0 1 7 0 7 27 0

gls_tipo_imputado

Distribution

Distribution of values for gls_tipo_imputado

Distribution of values for gls_tipo_imputado

0 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
gls_tipo_imputado character 0 1 6 0 7 11 0

fec_comision

Distribution

## 342509  unique, categorical values, so not shown.

0 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique min median max label
fec_comision POSIXct 0 1 342509 1900-01-01 2014-04-22 18:30:00 2019-12-31 06:00:00

termino_relacion

Distribution

## 4346  unique, categorical values, so not shown.

21 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique min median max label
termino_relacion POSIXct 21 0.999963 4346 2002-10-24 2014-11-13 2021-07-20

lugar_ocurrencia

Distribution

Distribution of values for lugar_ocurrencia

Distribution of values for lugar_ocurrencia

3866 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
lugar_ocurrencia character 3866 0.9931972 9 0 25 61 0

gls_sitiosuceso

Distribution

Distribution of values for gls_sitiosuceso

Distribution of values for gls_sitiosuceso

4803 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
gls_sitiosuceso character 4803 0.9915484 54 0 3 32 0

gls_comuna

Distribution

Distribution of values for gls_comuna

Distribution of values for gls_comuna

1048 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
gls_comuna character 1048 0.9981559 346 0 4 20 0

region_delito

Distribution

Distribution of values for region_delito

Distribution of values for region_delito

1048 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
region_delito character 1048 0.9981559 21 0 6 50 0

fec_cbiorelacion

Distribution

## 43966  unique, categorical values, so not shown.

0 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique min median max label
fec_cbiorelacion POSIXct 0 1 43966 2002-10-24 2014-11-13 2021-07-20

medidas_155

Distribution

Distribution of values for medidas_155

Distribution of values for medidas_155

510920 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
medidas_155 character 510920 0.1009631 1 0 2 2 0

medidas_pp

Distribution

Distribution of values for medidas_pp

Distribution of values for medidas_pp

546001 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
medidas_pp character 546001 0.039233 1 0 2 2 0

medidas_ip

Distribution

Distribution of values for medidas_ip

Distribution of values for medidas_ip

567564 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
medidas_ip character 567564 0.0012898 1 0 2 2 0

marca_suspension_43

Distribution

Distribution of values for marca_suspension_43

Distribution of values for marca_suspension_43

498761 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
marca_suspension_43 character 498761 0.1223586 2 0 2 2 0

marca_pena_44

Distribution

Distribution of values for marca_pena_44

Distribution of values for marca_pena_44

498761 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
marca_pena_44 character 498761 0.1223586 1 0 2 2 0

marca_multa_45

Distribution

Distribution of values for marca_multa_45

Distribution of values for marca_multa_45

498761 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
marca_multa_45 character 498761 0.1223586 2 0 2 2 0

medida_alternativa_46

Distribution

Distribution of values for medida_alternativa_46

Distribution of values for medida_alternativa_46

527687 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
medida_alternativa_46 character 527687 0.0714591 4 0 4 20 0

clasificacion_pena_47

Distribution

Distribution of values for clasificacion_pena_47

Distribution of values for clasificacion_pena_47

498761 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
clasificacion_pena_47 character 498761 0.1223586 9 0 7 28 0

tramos_condena_48

Distribution

Distribution of values for tramos_condena_48

Distribution of values for tramos_condena_48

564619 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
tramos_condena_48 character 564619 0.006472 5 0 15 23 0

clasificacion_penarpa_1_49

Distribution

Distribution of values for clasificacion_penarpa_1_49

Distribution of values for clasificacion_penarpa_1_49

564614 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
clasificacion_penarpa_1_49 character 564614 0.0064808 8 0 5 53 0

clasificacion_penarpa_2_50

Distribution

Distribution of values for clasificacion_penarpa_2_50

Distribution of values for clasificacion_penarpa_2_50

568178 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
clasificacion_penarpa_2_50 character 568178 0.0002094 4 0 17 53 0

marca_suspension_51

Distribution

Distribution of values for marca_suspension_51

Distribution of values for marca_suspension_51

568220 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
marca_suspension_51 character 568220 0.0001355 2 0 2 2 0

marca_pena_52

Distribution

Distribution of values for marca_pena_52

Distribution of values for marca_pena_52

568220 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
marca_pena_52 character 568220 0.0001355 1 0 2 2 0

marca_multa_53

Distribution

Distribution of values for marca_multa_53

Distribution of values for marca_multa_53

568220 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
marca_multa_53 character 568220 0.0001355 2 0 2 2 0

medida_alternativa_54

Distribution

Distribution of values for medida_alternativa_54

Distribution of values for medida_alternativa_54

568252 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
medida_alternativa_54 character 568252 0.0000792 4 0 4 20 0

clasificacion_pena_55

Distribution

Distribution of values for clasificacion_pena_55

Distribution of values for clasificacion_pena_55

568220 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique empty min max whitespace label
clasificacion_pena_55 character 568220 0.0001355 6 0 7 27 0

tramos_condena_56

Distribution

## Error in if (stats::median(table(x)) == 1) {: valor ausente donde TRUE/FALSE es necesario
## No non-missing values to show.

568297 missing values.

Summary statistics

name data_type n_missing complete_rate count label
tramos_condena_56 logical 568297 0 :

clasificacion_penarpa_1_57

Distribution

## Error in if (stats::median(table(x)) == 1) {: valor ausente donde TRUE/FALSE es necesario
## No non-missing values to show.

568297 missing values.

Summary statistics

name data_type n_missing complete_rate count label
clasificacion_penarpa_1_57 logical 568297 0 :

clasificacion_penarpa_2_58

Distribution

## Error in if (stats::median(table(x)) == 1) {: valor ausente donde TRUE/FALSE es necesario
## No non-missing values to show.

568297 missing values.

Summary statistics

name data_type n_missing complete_rate count label
clasificacion_penarpa_2_58 logical 568297 0 :

fec_comision_simple

Distribution

## 5574  unique, categorical values, so not shown.

0 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique min median max label
fec_comision_simple Date 0 1 5574 1900-01-01 2014-04-22 2019-12-31

fec_cbiorelacion_simple

Distribution

## 4346  unique, categorical values, so not shown.

0 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique min median max label
fec_cbiorelacion_simple Date 0 1 4346 2002-10-24 2014-11-13 2021-07-20

fec_nacimiento_simple

Distribution

## 16430  unique, categorical values, so not shown.

0 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique min median max label
fec_nacimiento_simple Date 0 1 16430 1855-09-14 1982-10-13 2016-07-29

termino_relacion_simple

Distribution

## 4346  unique, categorical values, so not shown.

21 missing values.

Summary statistics

name data_type n_missing complete_rate n_unique min median max label
termino_relacion_simple Date 21 0.999963 4346 2002-10-24 2014-11-13 2021-07-20

edad_comision

Distribution

Distribution of values for edad_comision

Distribution of values for edad_comision

0 missing values.

Summary statistics

name data_type n_missing complete_rate min median max mean sd hist label
edad_comision numeric 0 1 -101 32 160 34.61056 16.16035 <U+2581><U+2581><U+2587><U+2581><U+2581>

edad_ter_rel

Distribution

Distribution of values for edad_ter_rel

Distribution of values for edad_ter_rel

21 missing values.

Summary statistics

name data_type n_missing complete_rate min median max mean sd hist label
edad_ter_rel numeric 21 0.999963 -2.3 32 160 35.22007 15.98832 <U+2586><U+2587><U+2581><U+2581><U+2581>

Missingness report

Codebook table

JSON-LD metadata

The following JSON-LD can be found by search engines, if you share this codebook publicly on the web.

{
  "name": "Prosecutor Support System (SAF), database of the Public Prosecutor's Office.",
  "description": "The information was extracted and processed from the Prosecutor Support System (SAF) database in accordance with the criteria established in the methodological document 'Criteria for Extracting Information from the SAF - 11_04_2018', prepared and updated in 2018 by the Studies, Evaluation, Control and Management Development Division. Data obtained at 2021-08-13; Period= 2010 to 2019; Unit of measurement= Relationships; Offenses considered= All; Date to consider= Date of termination of the case; National Coverage; Detail or summary= Detail; In the search for victims, only direct victims were considered; The RUTs indicated are searched only in cases terminated or suspended in the period 2010 - 2019;\nThe following types of accused are considered: COMPLAINED, ACCUSED, QUERELLED, WITNESS, SUSPECTED AND INVESTIGATED\n\n\n## Table of variables\nThis table contains variable names, labels, and number of missing values.\nSee the complete codebook for more.\n\n|name                       |label | n_missing|\n|:--------------------------|:-----|---------:|\n|fec_nacimiento             |      |         0|\n|pais                       |      |         0|\n|sexo                       |      |         0|\n|encontrado_como_victima    |      |         0|\n|encontrado_como_imputado   |      |         0|\n|tipo_sujeto_vic            |      |     18053|\n|gls_tipo_sujeto_vic        |      |     18053|\n|idsujeto_victima           |      |         0|\n|reg                        |      |         0|\n|gls_region                 |      |         0|\n|tipo_termino               |      |        21|\n|agrupa_terminos            |      |        21|\n|gls_materia                |      |         0|\n|familia_delito             |      |         0|\n|relacion_vifsaf            |      |         0|\n|gls_parentesco             |      |    452460|\n|gls_mottermino             |      |     10353|\n|gls_motsuspension          |      |    493206|\n|gls_proctermino            |      |         0|\n|gls_tipo_imputado          |      |         0|\n|fec_comision               |      |         0|\n|termino_relacion           |      |        21|\n|lugar_ocurrencia           |      |      3866|\n|gls_sitiosuceso            |      |      4803|\n|gls_comuna                 |      |      1048|\n|region_delito              |      |      1048|\n|fec_cbiorelacion           |      |         0|\n|medidas_155                |      |    510920|\n|medidas_pp                 |      |    546001|\n|medidas_ip                 |      |    567564|\n|marca_suspension_43        |      |    498761|\n|marca_pena_44              |      |    498761|\n|marca_multa_45             |      |    498761|\n|medida_alternativa_46      |      |    527687|\n|clasificacion_pena_47      |      |    498761|\n|tramos_condena_48          |      |    564619|\n|clasificacion_penarpa_1_49 |      |    564614|\n|clasificacion_penarpa_2_50 |      |    568178|\n|marca_suspension_51        |      |    568220|\n|marca_pena_52              |      |    568220|\n|marca_multa_53             |      |    568220|\n|medida_alternativa_54      |      |    568252|\n|clasificacion_pena_55      |      |    568220|\n|tramos_condena_56          |      |    568297|\n|clasificacion_penarpa_1_57 |      |    568297|\n|clasificacion_penarpa_2_58 |      |    568297|\n|fec_comision_simple        |      |         0|\n|fec_cbiorelacion_simple    |      |         0|\n|fec_nacimiento_simple      |      |         0|\n|termino_relacion_simple    |      |        21|\n|edad_comision              |      |         0|\n|edad_ter_rel               |      |        21|\n\n### Note\nThis dataset was automatically described using the [codebook R package](https://rubenarslan.github.io/codebook/) (version 0.9.2).",
  "datePublished": "2022-03-16",
  "keywords": ["fec_nacimiento", "pais", "sexo", "encontrado_como_victima", "encontrado_como_imputado", "tipo_sujeto_vic", "gls_tipo_sujeto_vic", "idsujeto_victima", "reg", "gls_region", "tipo_termino", "agrupa_terminos", "gls_materia", "familia_delito", "relacion_vifsaf", "gls_parentesco", "gls_mottermino", "gls_motsuspension", "gls_proctermino", "gls_tipo_imputado", "fec_comision", "termino_relacion", "lugar_ocurrencia", "gls_sitiosuceso", "gls_comuna", "region_delito", "fec_cbiorelacion", "medidas_155", "medidas_pp", "medidas_ip", "marca_suspension_43", "marca_pena_44", "marca_multa_45", "medida_alternativa_46", "clasificacion_pena_47", "tramos_condena_48", "clasificacion_penarpa_1_49", "clasificacion_penarpa_2_50", "marca_suspension_51", "marca_pena_52", "marca_multa_53", "medida_alternativa_54", "clasificacion_pena_55", "tramos_condena_56", "clasificacion_penarpa_1_57", "clasificacion_penarpa_2_58", "fec_comision_simple", "fec_cbiorelacion_simple", "fec_nacimiento_simple", "termino_relacion_simple", "edad_comision", "edad_ter_rel"],
  "@context": "http://schema.org/",
  "@type": "Dataset",
  "variableMeasured": [
    {
      "name": "fec_nacimiento",
      "@type": "propertyValue"
    },
    {
      "name": "pais",
      "@type": "propertyValue"
    },
    {
      "name": "sexo",
      "@type": "propertyValue"
    },
    {
      "name": "encontrado_como_victima",
      "@type": "propertyValue"
    },
    {
      "name": "encontrado_como_imputado",
      "@type": "propertyValue"
    },
    {
      "name": "tipo_sujeto_vic",
      "@type": "propertyValue"
    },
    {
      "name": "gls_tipo_sujeto_vic",
      "@type": "propertyValue"
    },
    {
      "name": "idsujeto_victima",
      "@type": "propertyValue"
    },
    {
      "name": "reg",
      "@type": "propertyValue"
    },
    {
      "name": "gls_region",
      "@type": "propertyValue"
    },
    {
      "name": "tipo_termino",
      "@type": "propertyValue"
    },
    {
      "name": "agrupa_terminos",
      "@type": "propertyValue"
    },
    {
      "name": "gls_materia",
      "@type": "propertyValue"
    },
    {
      "name": "familia_delito",
      "@type": "propertyValue"
    },
    {
      "name": "relacion_vifsaf",
      "@type": "propertyValue"
    },
    {
      "name": "gls_parentesco",
      "@type": "propertyValue"
    },
    {
      "name": "gls_mottermino",
      "@type": "propertyValue"
    },
    {
      "name": "gls_motsuspension",
      "@type": "propertyValue"
    },
    {
      "name": "gls_proctermino",
      "@type": "propertyValue"
    },
    {
      "name": "gls_tipo_imputado",
      "@type": "propertyValue"
    },
    {
      "name": "fec_comision",
      "@type": "propertyValue"
    },
    {
      "name": "termino_relacion",
      "@type": "propertyValue"
    },
    {
      "name": "lugar_ocurrencia",
      "@type": "propertyValue"
    },
    {
      "name": "gls_sitiosuceso",
      "@type": "propertyValue"
    },
    {
      "name": "gls_comuna",
      "@type": "propertyValue"
    },
    {
      "name": "region_delito",
      "@type": "propertyValue"
    },
    {
      "name": "fec_cbiorelacion",
      "@type": "propertyValue"
    },
    {
      "name": "medidas_155",
      "@type": "propertyValue"
    },
    {
      "name": "medidas_pp",
      "@type": "propertyValue"
    },
    {
      "name": "medidas_ip",
      "@type": "propertyValue"
    },
    {
      "name": "marca_suspension_43",
      "@type": "propertyValue"
    },
    {
      "name": "marca_pena_44",
      "@type": "propertyValue"
    },
    {
      "name": "marca_multa_45",
      "@type": "propertyValue"
    },
    {
      "name": "medida_alternativa_46",
      "@type": "propertyValue"
    },
    {
      "name": "clasificacion_pena_47",
      "@type": "propertyValue"
    },
    {
      "name": "tramos_condena_48",
      "@type": "propertyValue"
    },
    {
      "name": "clasificacion_penarpa_1_49",
      "@type": "propertyValue"
    },
    {
      "name": "clasificacion_penarpa_2_50",
      "@type": "propertyValue"
    },
    {
      "name": "marca_suspension_51",
      "@type": "propertyValue"
    },
    {
      "name": "marca_pena_52",
      "@type": "propertyValue"
    },
    {
      "name": "marca_multa_53",
      "@type": "propertyValue"
    },
    {
      "name": "medida_alternativa_54",
      "@type": "propertyValue"
    },
    {
      "name": "clasificacion_pena_55",
      "@type": "propertyValue"
    },
    {
      "name": "tramos_condena_56",
      "@type": "propertyValue"
    },
    {
      "name": "clasificacion_penarpa_1_57",
      "@type": "propertyValue"
    },
    {
      "name": "clasificacion_penarpa_2_58",
      "@type": "propertyValue"
    },
    {
      "name": "fec_comision_simple",
      "@type": "propertyValue"
    },
    {
      "name": "fec_cbiorelacion_simple",
      "@type": "propertyValue"
    },
    {
      "name": "fec_nacimiento_simple",
      "@type": "propertyValue"
    },
    {
      "name": "termino_relacion_simple",
      "@type": "propertyValue"
    },
    {
      "name": "edad_comision",
      "@type": "propertyValue"
    },
    {
      "name": "edad_ter_rel",
      "@type": "propertyValue"
    }
  ]
}`


Session Info

Sys.getenv("R_LIBS_USER")
## [1] "C:/Users/CISS Fondecyt/Mi unidad/Alvacast/SISTRAT 2022 (github)/renv/library/R-4.1/x86_64-w64-mingw32;C:/Program Files/R/R-4.1.2/library"
rstudioapi::getSourceEditorContext()
## Document Context: 
## - id:        '0A11E429'
## - path:      'C:/Users/CISS Fondecyt/Mi unidad/Alvacast/SISTRAT 2019 (github)/SUD_CL/Fiscalia_merge.Rmd'
## - contents:  <1721 rows>
## Document Selection:
## - [459, 1] -- [459, 1]: ''
#save.image("G:/Mi unidad/Alvacast/SISTRAT 2019 (github)/mult_state_carla.RData")

if (grepl("CISS Fondecyt",rstudioapi::getSourceEditorContext()$path)==T){
    save.image("C:/Users/CISS Fondecyt/Mi unidad/Alvacast/SISTRAT 2019 (github)/10.RData")
  } else if (grepl("andre",rstudioapi::getSourceEditorContext()$path)==T){
    save.image("C:/Users/andre/Desktop/SUD_CL/10.RData")
  } else if (grepl("E:",rstudioapi::getSourceEditorContext()$path)==T){
    save.image("E:/Mi unidad/Alvacast/SISTRAT 2019 (github)/10.RData")
  } else {
    save.image(paste0(sub("SUD_CL","",path),"10.RData"))
  }

sessionInfo()
## R version 4.1.2 (2021-11-01)
## Platform: x86_64-w64-mingw32/x64 (64-bit)
## Running under: Windows 10 x64 (build 19042)
## 
## Matrix products: default
## 
## locale:
## [1] LC_COLLATE=Spanish_Chile.1252  LC_CTYPE=Spanish_Chile.1252   
## [3] LC_MONETARY=Spanish_Chile.1252 LC_NUMERIC=C                  
## [5] LC_TIME=Spanish_Chile.1252    
## 
## attached base packages:
## [1] stats     graphics  grDevices utils     datasets  methods   base     
## 
## other attached packages:
##  [1] future_1.24.0       ggrepel_0.9.1       readxl_1.3.1       
##  [4] job_0.3.0           compareGroups_4.5.1 sjPlot_2.8.10      
##  [7] explore_0.8.0       daff_0.3.5          ggside_0.2.0       
## [10] ggstatsplot_0.9.1   flextable_0.7.0     ClusterR_1.2.6     
## [13] gtools_3.9.2        polycor_0.8-1       caret_6.0-90       
## [16] rpivotTable_0.3.0   Metrics_0.1.4       muhaz_1.2.6.4      
## [19] flexsurv_2.1        mstate_0.3.2        DiagrammeR_1.0.9   
## [22] Amelia_1.8.0        Rcpp_1.0.8          igraph_1.2.11      
## [25] eha_2.9.0           cobalt_4.3.2        tableone_0.13.0    
## [28] stargazer_5.2.3     reshape2_1.4.4      foreign_0.8-81     
## [31] survMisc_0.5.5      ggfortify_0.4.14    survminer_0.4.9    
## [34] ggpubr_0.4.0        epiR_2.0.43         forcats_0.5.1      
## [37] purrr_0.3.4         readr_2.1.2         tibble_3.1.6       
## [40] tidyverse_1.3.1     dplyr_1.0.8         treemapify_2.5.5   
## [43] sf_1.0-7            ggiraph_0.8.2       finalfit_1.0.4     
## [46] lsmeans_2.30-0      emmeans_1.7.2       RColorBrewer_1.1-2 
## [49] panelr_0.7.6        lme4_1.1-28         Matrix_1.3-4       
## [52] data.table_1.14.2   codebook_0.9.2      devtools_2.4.3     
## [55] usethis_2.1.5       sqldf_0.4-11        RSQLite_2.2.10     
## [58] gsubfn_0.7          proto_1.0.0         broom_0.7.12       
## [61] zoo_1.8-9           rbokeh_0.5.2        janitor_2.1.0      
## [64] plotly_4.10.0       kableExtra_1.3.4    Hmisc_4.6-0        
## [67] Formula_1.2-4       survival_3.2-13     lattice_0.20-45    
## [70] ggplot2_3.3.5       stringr_1.4.0       stringi_1.7.6      
## [73] tidyr_1.2.0         knitr_1.37          matrixStats_0.61.0 
## [76] boot_1.3-28         withr_2.5.0         pacman_0.5.1       
## 
## loaded via a namespace (and not attached):
##   [1] svglite_2.1.0          class_7.3-19           ps_1.6.0              
##   [4] foreach_1.5.2          rprojroot_2.0.2        crayon_1.5.0          
##   [7] V8_4.1.0               MASS_7.3-54            nlme_3.1-153          
##  [10] backports_1.4.1        reprex_2.0.1           rlang_1.0.2           
##  [13] performance_0.8.0      nloptr_2.0.0           callr_3.7.0           
##  [16] bit64_4.0.5            glue_1.6.2             parallel_4.1.2        
##  [19] processx_3.5.2         classInt_0.4-3         tcltk_4.1.2           
##  [22] haven_2.4.3            tidyselect_1.1.2       km.ci_0.5-2           
##  [25] sjmisc_2.8.9           mc2d_0.1-21            chron_2.3-56          
##  [28] xtable_1.8-4           magrittr_2.0.2         evaluate_0.15         
##  [31] gdtools_0.2.4          cli_3.2.0              rstudioapi_0.13       
##  [34] bslib_0.3.1            rpart_4.1-15           jtools_2.1.4          
##  [37] sjlabelled_1.1.8       maps_3.4.0             shiny_1.7.1           
##  [40] gistr_0.9.0            xfun_0.30              parameters_0.16.0     
##  [43] pkgbuild_1.3.1         cluster_2.1.2          WRS2_1.1-3            
##  [46] ggfittext_0.9.1        listenv_0.8.0          png_0.1-7             
##  [49] reshape_0.8.8          ipred_0.9-12           zeallot_0.1.0         
##  [52] plyr_1.8.6             cellranger_1.1.0       hardhat_0.2.0         
##  [55] e1071_1.7-9            pROC_1.18.0            survey_4.1-1          
##  [58] coda_0.19-4            pillar_1.7.0           cachem_1.0.6          
##  [61] fs_1.5.2               paletteer_1.4.0        vctrs_0.3.8           
##  [64] ellipsis_0.3.2         generics_0.1.2         lava_1.6.10           
##  [67] tools_4.1.2            munsell_0.5.0          proxy_0.4-26          
##  [70] fastmap_1.1.0          compiler_4.1.2         pkgload_1.2.4         
##  [73] abind_1.4-5            httpuv_1.6.5           sessioninfo_1.2.2     
##  [76] prodlim_2019.11.13     gridExtra_2.3          visNetwork_2.1.0      
##  [79] utf8_1.2.2             later_1.3.0            recipes_0.2.0         
##  [82] jsonlite_1.8.0         scales_1.1.1           carData_3.0-5         
##  [85] estimability_1.3       lazyeval_0.2.2         promises_1.2.0.1      
##  [88] car_3.0-12             latticeExtra_0.6-29    effectsize_0.6.0.1    
##  [91] checkmate_2.0.0        rmarkdown_2.12         webshot_0.5.2         
##  [94] pander_0.6.4           numDeriv_2016.8-1.1    yaml_2.3.5            
##  [97] systemfonts_1.0.4      htmltools_0.5.2        memoise_2.0.1         
## [100] quadprog_1.5-8         viridisLite_0.4.0      gmp_0.6-4             
## [103] digest_0.6.29          assertthat_0.2.1       mime_0.12             
## [106] repr_1.1.4             bayestestR_0.11.5      BiasedUrn_1.07        
## [109] KMsurv_0.1-5           units_0.8-0            future.apply_1.8.1    
## [112] remotes_2.4.2          blob_1.2.2             labeling_0.4.2        
## [115] deSolve_1.30           splines_4.1.2          rematch2_2.1.2        
## [118] hms_1.1.1              modelr_0.1.8           colorspace_2.0-3      
## [121] base64enc_0.1-3        nnet_7.3-16            sass_0.4.0            
## [124] mvtnorm_1.1-3          fansi_1.0.2            tzdb_0.2.0            
## [127] truncnorm_1.0-8        brio_1.1.3             parallelly_1.30.0     
## [130] ModelMetrics_1.2.2.2   R6_2.5.1               grid_4.1.2            
## [133] crul_1.2.0             lifecycle_1.0.1        labelled_2.9.0        
## [136] statsExpressions_1.3.0 writexl_1.4.0          zip_2.2.0             
## [139] datawizard_0.3.0       curl_4.3.2             ggsignif_0.6.3        
## [142] pryr_0.1.5             minqa_1.2.4            testthat_3.1.2        
## [145] jquerylib_0.1.4        snakecase_0.11.0       skimr_2.1.3           
## [148] desc_1.4.1             iterators_1.0.14       gower_1.0.0           
## [151] htmlwidgets_1.5.4      officer_0.4.1          crosstalk_1.2.0       
## [154] rvest_1.0.2            globals_0.14.0         insight_0.16.0        
## [157] htmlTable_2.4.0        patchwork_1.1.1        codetools_0.2-18      
## [160] lubridate_1.8.0        prettyunits_1.1.1      dbplyr_2.1.1          
## [163] correlation_0.8.0      gtable_0.3.0           DBI_1.1.2             
## [166] stats4_4.1.2           highr_0.9              httr_1.4.2            
## [169] KernSmooth_2.23-20     farver_2.1.0           uuid_1.0-3            
## [172] rmdpartials_0.5.8      hexbin_1.28.2          timeDate_3043.102     
## [175] mice_3.14.0            DT_0.21                xml2_1.3.3            
## [178] admisc_0.25            ggeffects_1.1.1        bit_4.0.4             
## [181] sjstats_0.18.1         jpeg_0.1-9             pkgconfig_2.0.3       
## [184] rstatix_0.7.0          HardyWeinberg_1.7.4    mitools_2.4           
## [187] Rsolnp_1.16            httpcode_0.3.0

Exportar

if(no_mostrar==0){
  codebook::var_label(surveymonkey_accionsalududp_df2_cor_sel_2) <-
  var_labels_df%>% 
    codebook::dict_to_list()
    
  attr(surveymonkey_accionsalududp_df2_cor_sel_2$rn,"label")<-'Número de Fila'  
    
  for (i in 1:length(surveymonkey_accionsalududp_df2_cor_table)){
      x<-names(surveymonkey_accionsalududp_df2_cor_table)[i]
      attr(surveymonkey_accionsalududp_df2_cor_sel_2[[x]],"label")<- attr(surveymonkey_accionsalududp_df2_cor_table[[x]],"label")
  
  var_labels_df<-data.frame()
  for (i in 1:length(surveymonkey_accionsalududp_df2_cor_sel_2)){
    x<-names(surveymonkey_accionsalududp_df2_cor_sel_2)[i]
  var_labels_df<-rbind.data.frame(var_labels_df, cbind(x, attr(surveymonkey_accionsalududp_df2_cor_sel_2[[x]],"label")))
    }
  }
}

  base_fiscalia %>% 
  dplyr::mutate(accused=dplyr::case_when(encontrado_como_victima=="SI" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                 encontrado_como_victima=="NO" & encontrado_como_imputado=="SI"~"IMPUTADO",
                                 T~"VICTIMA")) %>% 
  dplyr::filter(accused=="VICTIMA") %>% 
    rio::export(file = paste0(gsub("SUD_CL","",path),"fiscalia_mariel_ago_2021.dta"))
## Error in as.character(x): cannot coerce type 'closure' to vector of type 'character'